vimrc 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. " enable syntax highlighting
  2. syntax enable
  3. " show line numbers
  4. set number
  5. " set tabs to have 4 spaces
  6. set ts=4
  7. " indent when moving to the next line while writing code
  8. set autoindent
  9. " expand tabs into spaces
  10. set expandtab
  11. " when using the >> or << commands, shift lines by 4 spaces
  12. set shiftwidth=4
  13. " show a visual line under the cursor's current line
  14. set cursorline
  15. " show the matching part of the pair for [] {} and ()
  16. set showmatch
  17. set background=dark
  18. let g:go_highlight_types = 1
  19. let g:go_highlight_fields = 1
  20. let g:go_highlight_functions = 1
  21. let g:go_highlight_function_calls = 1
  22. let g:go_highlight_operators = 1
  23. let g:go_highlight_extra_types = 1
  24. let g:go_highlight_build_constraints = 1
  25. let g:go_highlight_generate_tags = 1
  26. " enable all Python syntax highlighting features
  27. " let python_highlight_all = 1
  28. " syntax on
  29. "filetype plugin indent on
  30. " au filetype go inoremap <buffer> . .<C-x><C-o>
  31. call plug#begin()
  32. " The default plugin directory will be as follows:
  33. " - Vim (Linux/macOS): '~/.vim/plugged'
  34. " - Vim (Windows): '~/vimfiles/plugged'
  35. " - Neovim (Linux/macOS/Windows): stdpath('data') . '/plugged'
  36. " You can specify a custom plugin directory by passing it as the argument
  37. " - e.g. `call plug#begin('~/.vim/plugged')`
  38. " - Avoid using standard Vim directory names like 'plugin'
  39. " Make sure you use single quotes
  40. " Plug 'junegunn/fzf.vim'
  41. Plug 'preservim/nerdtree'
  42. Plug 'rust-lang/rust.vim'
  43. " Plug 'deoplete-plugins/deoplete-clang'
  44. " Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
  45. Plug 'neoclide/coc.nvim', {'branch': 'release'}
  46. " Plug 'nvim-treesitter/nvim-treesitter'
  47. Plug 'neovim/nvim-lspconfig'
  48. " Plug 'ray-x/go.nvim'
  49. Plug '~/Downloads/autoclose.vim'
  50. " Initialize plugin system
  51. " - Automatically executes `filetype plugin indent on` and `syntax enable`.
  52. "
  53. call plug#end()
  54. " You can revert the settings after the call like so:
  55. " filetype indent off " Disable file-type-specific indentation
  56. " syntax off " Disable syntax highlighting
  57. let NERDTreeShowHidden=1
  58. " Use tab for trigger completion with characters ahead and navigate
  59. " NOTE: There's always complete item selected by default, you may want to enable
  60. " no select by `"suggest.noselect": true` in your configuration file
  61. " NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
  62. " other plugin before putting this into your config
  63. inoremap <silent><expr> <TAB>
  64. \ coc#pum#visible() ? coc#pum#next(1) :
  65. \ CheckBackspace() ? "\<Tab>" :
  66. \ coc#refresh()
  67. inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"