init.vim 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. let g:python_host_prog = '/usr/local/bin/python'
  2. let g:python3_host_prog = '/usr/local/bin/python3'
  3. " set t_Co=256
  4. set number
  5. set laststatus=2
  6. set background=dark
  7. set shiftwidth=4
  8. set showcmd
  9. set nocompatible
  10. set path+=**
  11. set wildmenu
  12. set tabstop=2
  13. set shiftwidth=2
  14. set expandtab
  15. " colorscheme PaperColor
  16. " colorscheme ubloh
  17. colorscheme muon
  18. " Specify a directory for plugins
  19. " - For Neovim: ~/.local/share/nvim/plugged
  20. " - Avoid using standard Vim directory names like 'plugin'
  21. call plug#begin('~/.local/share/nvim/plugs')
  22. " Make sure you use single quotes
  23. Plug 'arakashic/chromatica.nvim'
  24. Plug 'abudden/taghighlight-automirror'
  25. Plug 'tomasiser/vim-code-dark'
  26. Plug 'romainl/Apprentice'
  27. Plug 'junegunn/vim-easy-align'
  28. Plug 'vim-airline/vim-airline'
  29. Plug 'vim-airline/vim-airline-themes'
  30. Plug 'cocopon/iceberg.vim'
  31. Plug 'drewtempelmeyer/palenight.vim'
  32. Plug 'ayu-theme/ayu-vim'
  33. Plug 'arcticicestudio/nord-vim'
  34. " Remove whitespace
  35. Plug 'ntpeters/vim-better-whitespace'
  36. " Any valid git URL is allowed
  37. Plug 'https://github.com/junegunn/vim-github-dashboard.git'
  38. " Multiple Plug commands can be written in a single line using | separators
  39. Plug 'SirVer/ultisnips'
  40. Plug 'honza/vim-snippets'
  41. " On-demand loading
  42. Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
  43. Plug 'Xuyuanp/nerdtree-git-plugin'
  44. Plug 'ryanoasis/vim-devicons'
  45. Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
  46. Plug 'Valloric/YouCompleteMe'
  47. " Using a non-master branch
  48. Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
  49. Plug 'ncm2/ncm2', { 'do': ':UpdateRemotePlugins'}
  50. Plug 'roxma/nvim-yarp'
  51. " NOTE: you need to install completion sources to get completions. Check
  52. " our wiki page for a list of sources: https://github.com/ncm2/ncm2/wiki
  53. Plug 'ncm2/ncm2-bufword'
  54. " Plug 'ncm2/ncm2-tmux'
  55. Plug 'ncm2/ncm2-path'
  56. " Plug 'ncm2/utilsnips'
  57. Plug 'wakatime/vim-wakatime'
  58. Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
  59. Plug 'autozimu/LanguageClient-neovim', {
  60. \ 'branch': 'next',
  61. \ 'do': 'bash install.sh',
  62. \ }
  63. Plug 'junegunn/fzf'
  64. Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
  65. Plug 'zchee/deoplete-clang'
  66. " Unmanaged plugin (manually installed and updated)
  67. Plug '~/my-prototype-plugin'
  68. Plug 'autozimu/LanguageClient-neovim', {
  69. \ 'branch': 'next',
  70. \ 'do': 'zsh install.sh'
  71. \ }
  72. Plug 'pangloss/vim-javascript'
  73. Plug 'https://github.com/tpope/vim-fugitive'
  74. Plug 'airblade/vim-gitgutter'
  75. Plug 'ludovicchabant/vim-gutentags'
  76. Plug 'zivyangll/git-blame.vim'
  77. Plug 'simplyzhao/cscope_maps.vim'
  78. Plug 'tpope/vim-commentary'
  79. Plug 'isRuslan/vim-es6'
  80. Plug 'rhysd/vim-clang-format'
  81. call plug#end()
  82. let g:ycm_global_ycm_extra_conf = '~/.local/share/nvim/plugs/YouCompleteMe/.ycm_extra_conf.py'
  83. " C++ syntax highlighting modifications
  84. let g:cpp_class_scope_highlight = 1
  85. let g:cpp_member_variable_highlight = 1
  86. let g:cpp_class_decl_highlight = 1
  87. let g:cpp_experimental_template_highlight = 1
  88. let g:airline#extensions#tabline#enabled = 1
  89. " Chromatica for better better C/C++ syntax highlighting
  90. let g:chromatica#libclang_path='/usr/lib'
  91. let g:chromatica#enable_at_startup=1
  92. " enable ncm2 for all buffers
  93. autocmd BufEnter * call ncm2#enable_for_buffer()
  94. " IMPORTANTE: :help Ncm2PopupOpen for more information
  95. set completeopt=noinsert,menuone,noselect
  96. autocmd StdinReadPre * let s:std_in=1
  97. " Open NERDTree if vim is launched with no file
  98. " autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
  99. " Map Ctrl-N to toggle nerd tree
  100. map <C-n> :NERDTreeToggle<CR>
  101. " Close vim if NERDTree is the only window left open
  102. " autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
  103. nnoremap <Leader>s :<C-u>call gitblame#echo()<CR>
  104. " Any additional tags that we might need (3rfd party C++ libraries, for
  105. " example)
  106. "
  107. set tags+=/usr/local/include/node
  108. " colorscheme codedark
  109. let g:PaperColor_Theme_Options = {
  110. \ 'language': {
  111. \ 'python': {
  112. \ 'highlight_builtins' : 1
  113. \ },
  114. \ 'cpp': {
  115. \ 'highlight_standard_library': 1
  116. \ },
  117. \ 'c': {
  118. \ 'highlight_builtins' : 1
  119. \ }
  120. \ }
  121. \ }
  122. let g:gutentags_enabled = 0
  123. augroup auto_gutentags
  124. au FileType c,cpp,javascript,python,java,scala,sh,groovy,vim let g:gutentags_enabled=1
  125. augroup plug#end
  126. Plug 'bfrg/vim-cpp-modern'
  127. Plug 'octol/vim-cpp-enhanced-highlight'
  128. let g:ycm_semantic_triggers = { 'cpp': ['re!(?=[a-zA-Z_]{1})'] }
  129. autocmd FileType c,cpp,h,hpp ClangFormatAutoEnable
  130. set encoding=UTF-8