Xinqi Bao's Git

update bashrc with some PATH and others
[dotfiles.git] / .config / nvim / init.vim
index 927f94b..9ec564b 100644 (file)
@@ -8,10 +8,10 @@ set t_ut=""
 "set term=xterm-256color
 
 "In order to display chinese in GBK
 "set term=xterm-256color
 
 "In order to display chinese in GBK
-let &termencoding=&encoding
+"let &termencoding=&encoding
 set fileencodings=utf-8,gbk
 set fileformat=unix
 set fileencodings=utf-8,gbk
 set fileformat=unix
-set foldmethod=manual
+set foldmethod=indent
 set encoding=utf-8 "required for ycm
 
 set tabstop=4
 set encoding=utf-8 "required for ycm
 
 set tabstop=4
@@ -90,7 +90,7 @@ call plug#begin()
     "Plug 'ycm-core/YouCompleteMe'
     "Plug 'rhysd/vim-clang-format'
 
     "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'
 
     Plug 'nvim-treesitter/nvim-treesitter'
     "Plug 'mfussenegger/nvim-dap'
@@ -215,11 +215,14 @@ if has_key(plugs, "coc.nvim")
                 \'coc-marketplace',
                 \'coc-highlight',
                 \'coc-clangd',
                 \'coc-marketplace',
                 \'coc-highlight',
                 \'coc-clangd',
-                \'coc-jedi',
-                \'coc-vimlsp',
+                \'coc-pyright',
+                \'coc-lua',
                 \'coc-sh',
                 \'coc-sh',
+                \'coc-cmake',
+                \'coc-xmake',
                 \'coc-json',
                 \'coc-json',
-                \'coc-yaml'
+                \'coc-yaml',
+                \'coc-vimlsp',
                 \]
 endif
 
                 \]
 endif
 
@@ -250,6 +253,9 @@ nnoremap <silent> <Leader>- :resize -5<CR>
 nnoremap <silent> <Leader>v+ :vertical resize +5<CR>
 nnoremap <silent> <Leader>v- :vertical 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
 
 "HighLight trailing whitespace"
 highlight ExtraWhitespace ctermbg=red guibg=red