Skip to content

Commit

Permalink
vimrc: update coc.nvim config
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangyinzuo committed Apr 6, 2024
1 parent 2b8ca9a commit c039832
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 37 deletions.
2 changes: 2 additions & 0 deletions root/.vim/doc/ai.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ vim:set ft=help:

*ai.txt*

cursor.so

Github Copilot
[tabnine](tabnine.com)(vscode, jetbrains)
codegeex
Expand Down
28 changes: 28 additions & 0 deletions root/.vim/doc/coc-nvim.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
*coc.nvim*

-------------------------------------------------------
自v0.15.0后,coc-list替代了mksession.vim

*基于coc-list保存会话session* :Mksession
*基于coc-list加载会话session* :Loadsession

-------------------------------------------------------

coc-snippets 不如coc-ultisnips配合UltiSnips插件好用

coc-git => gitgutter lazygit

coc-pairs => auto-pairs插件暂时不需要auto-pair补全
other sources: https://github.com/neoclide/coc-sources
Reference: https://github.com/neoclide

语法类插件(不好用):coc-grammarly

|clangd|
可以使用coc.nvim自带的支持(:CocConfig添加languageserver配置),也可以下载coc-clangd插件(clangd.enabled: true),两者不能同时使用

coc-marksman: 需要在根目录放一份.marksman.toml

coc-codegeex: Aminer的代码片段生成器,暂时不可用

coc-ltex: latex语法检查
13 changes: 2 additions & 11 deletions root/.vim/doc/mydoc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ ISSUE: helpfile开启ft=help后,在快速插入---------------------时存在
删除文件/文件夹 D
-------------------------------------------------------------------------------

自v0.15.0后,coc-list替代了mksession.vim

*基于coc-list保存会话session* :Mksession
*基于coc-list加载会话session* :Loadsession
-------------------------------------------------------------------------------

*往下/上翻1页* CTRL-F CTRL-B
*往下/上翻半页* CTRL-D CTRL-U

Expand Down Expand Up @@ -132,8 +126,7 @@ Markdown等文本编辑添加链接:
查找Hashtag并插入到当前光标位置 :Hashtag

-------------------------------------------------------------------------------
*lsp* *formatter* *linter* *coc.nvim*

*lsp* *formatter* *linter*
cpp ~

*clangd*
Expand Down Expand Up @@ -319,6 +312,4 @@ docker容器,容器内有许多课程独有的基于深度学习处理器(DL

5. Jetbrains Fleet

6. cursor.so

7. [distant](https://github.com/chipsenkbeil/distant)
6. [distant](https://github.com/chipsenkbeil/distant)
5 changes: 0 additions & 5 deletions root/.vim/doc/unused.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
<
*vim-airline/vim-airline* beautify status line

*skywind3000/vim-quickui* top menu

*preservim/nerdtree* file system explorer, see >
git show v0.2.1:root/vimrc.d/nerdtree.vim
<
Expand Down Expand Up @@ -45,6 +43,3 @@ Terminal Manager: https://zhuanlan.zhihu.com/p/469396812
endif
<

game:
vim/killersheep
johngrib/vim-game-snake
25 changes: 4 additions & 21 deletions root/.vim/vimrc.d/coc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,6 @@
" https://github.com/antoinemadec/coc-fzf/issues/113
let g:coc_fzf_location_delay = 20

" coc-snippets 不如coc-ultisnips配合UltiSnips插件好用
" 其它可选coc插件(有更好的vim插件可用):
" coc-lists(buffer, grep, lines, mru, quickfix, tags, files等列表源 => fzf.vim和leaderf
" coc-git => gitgutter lazygit
" coc-pairs => auto-pairs插件暂时不需要auto-pair补全
" other sources: https://github.com/neoclide/coc-sources
" Reference: https://github.com/neoclide
"
" 语法类插件(不好用):
" coc-grammarly
"
" clangd:
" 可以使用coc.nvim自带的支持(:CocConfig添加languageserver配置),也可以下载coc-clangd插件(clangd.enabled: true),两者不能同时使用
"
" coc-marksman: 需要在根目录放一份.marksman.toml
"
" coc-codegeex: Aminer的代码片段生成器,暂时不可用
"
" coc-ltex: latex语法检查
let g:coc_filetype_map = {'tex': 'latex'}
autocmd FileType tex ++once call coc#config('texlab.latexindent.local', $VIMRC_ROOT . "/latexindent.yaml")

Expand Down Expand Up @@ -49,7 +30,10 @@ augroup coc_mygroup
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
augroup end

inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm() : "\<CR>"
" Make <CR> to accept selected completion item or notify coc.nvim to format
" <C-g>u breaks current undo, please make your own choice
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
" Use `[g` and `]g` to navigate diagnostics
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list
Expand Down Expand Up @@ -170,7 +154,6 @@ nnoremap <silent><nowait> <leader>p :<C-u>CocListResume<CR>
autocmd filetype coctree nmap <buffer> <F1> :h coc-tree<CR>
" Use netrw instead
" autocmd filetype coc-explorer nmap <buffer> <F1> :h coc-explorer<CR>
" autocmd filetype coc-explorer nmap <buffer> gx :call coc_custom#NetrwGxHandler()<CR>
" nnoremap <silent><nowait> <leader>e :<C-u>CocCommand explorer<CR>
Expand Down

0 comments on commit c039832

Please sign in to comment.