Xinqi Bao's Git

upgrade clangd and nvim config
[dotfiles.git] / .config / nvim / init.vim
index 927f94b..76938e4 100644 (file)
@@ -90,7 +90,7 @@ call plug#begin()
     "Plug 'ycm-core/YouCompleteMe'
     "Plug 'rhysd/vim-clang-format'
 
-    Plug 'neoclide/coc.nvim'
+    Plug 'neoclide/coc.nvim', {'branch': 'release'}
 
     Plug 'nvim-treesitter/nvim-treesitter'
     "Plug 'mfussenegger/nvim-dap'
@@ -219,7 +219,8 @@ if has_key(plugs, "coc.nvim")
                 \'coc-vimlsp',
                 \'coc-sh',
                 \'coc-json',
-                \'coc-yaml'
+                \'coc-yaml',
+                \'coc-r-lsp',
                 \]
 endif
 
@@ -250,6 +251,9 @@ nnoremap <silent> <Leader>- :resize -5<CR>
 nnoremap <silent> <Leader>v+ :vertical resize +5<CR>
 nnoremap <silent> <Leader>v- :vertical resize -5<CR>
 
+" shortcut for folding
+nnoremap <silent> <Leader>fi :set foldmethod=indent<CR>
+nnoremap <silent> <Leader>fd :set foldmethod=manual<CR>ggVGzD
 
 "HighLight trailing whitespace"
 highlight ExtraWhitespace ctermbg=red guibg=red