VimPlugin: Coc.nvim: Difference between revisions
From wikinotes
(→Notes) |
|||
Line 54: | Line 54: | ||
|} | |} | ||
</blockquote><!-- Notes --> | </blockquote><!-- Notes --> | ||
= Configuration = | = Configuration = |
Revision as of 15:29, 28 December 2021
coc.nvim aims to be intellisense (visualstudio) for vim.
- autocompletion
- outliner
- refactor-rename
- goto
- show-references
WARNING:
coc.nvim DOES NOT play nice with other autocompleters.
Documentation
Locations
~/.config/nvim/coc-settings.json
config ~/.config/coc/extensions/node_modules/${plugin}
plugins installed here ~/.config/coc/memos.json
persisted plugin data
Notes
coc.nvim install coc.nvim language servers coc.nvim configuration coc.nvim usage coc.nvim troubleshooting
Configuration
Keybindings
coc.nvim does not provide function calls, they direct you to bind hotkeys instead.
nmap <silent> gd <Plug>(coc-definition) nmap <silent> gy <Plug>(coc-type-definition) nmap <silent> gi <Plug>(coc-implementation) nmap <silent> gr <Plug>(coc-references)
Usage
Builtin Commands
CocInstall coc-python " install a language CocUninstall coc-python " uninstall a language CocOutline " tagbar-like outlinerCustom Commands (derived from plug functions)
" ex: command CocRename silent exec "normal \<Plug>(coc-rename)" " Introspection (src, packages) CocDefinition " go to where variable assigned CocTypeDefinition " go to where variable type defined CocImplementation CocReferences " show uses of variable CocShowdocumentation " show docs " Formatting CocFormatBuffer " format file CocFormatSelected " format selection CocOrganizeImports " sort imports " Debugging CocInfo " show nvim, coc, lsp info CocOpenLog " show log
Troubleshooting
:CocInfo " print debug info