VimPlugin: Coc.nvim: Difference between revisions
From wikinotes
No edit summary |
|||
Line 7: | Line 7: | ||
* show-references | * show-references | ||
{{ WARNING | | {{ WARNING | | ||
coc.nvim '''DOES NOT''' play nice with other autocompleters. }} | coc.nvim '''DOES NOT''' play nice with other autocompleters. }} | ||
Line 53: | Line 53: | ||
= Install = | = Install = | ||
<blockquote> | <blockquote> | ||
< | <syntaxhighlight lang="vim"> | ||
# archlinux | # archlinux | ||
sudo pacman -S \ | sudo pacman -S \ | ||
Line 60: | Line 60: | ||
# macos | # macos | ||
brew install | brew install | ||
node.js \ | node.js \ | ||
npm | npm | ||
npm install -g neovim | npm install -g neovim | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="vim"> | ||
Plugin "https://github.com/neoclide/coc.nvim" | Plugin "https://github.com/neoclide/coc.nvim" | ||
</ | </syntaxhighlight> | ||
</blockquote><!-- Install --> | </blockquote><!-- Install --> | ||
= Keybindings = | = Configuration = | ||
<blockquote> | |||
== Keybindings == | |||
<blockquote> | <blockquote> | ||
coc.nvim does not provide function calls, they direct you to bind hotkeys instead. | coc.nvim does not provide function calls, they direct you to bind hotkeys instead. | ||
< | <syntaxhighlight lang="vim"> | ||
nmap <silent> gd <Plug>(coc-definition) | nmap <silent> gd <Plug>(coc-definition) | ||
nmap <silent> gy <Plug>(coc-type-definition) | nmap <silent> gy <Plug>(coc-type-definition) | ||
nmap <silent> gi <Plug>(coc-implementation) | nmap <silent> gi <Plug>(coc-implementation) | ||
nmap <silent> gr <Plug>(coc-references) | nmap <silent> gr <Plug>(coc-references) | ||
</ | </syntaxhighlight> | ||
</blockquote><!-- keybindings --> | </blockquote><!-- keybindings --> | ||
</blockquote><!-- Configuration --> | |||
= Usage = | |||
<blockquote> | |||
<syntaxhighlight lang="vim"> | |||
</syntaxhighlight> | |||
</blockquote><!-- Usage --> | |||
= Troubleshooting = | = Troubleshooting = |
Revision as of 02:09, 16 October 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
github https://github.com/neoclide/coc.nvim wiki https://github.com/neoclide/coc.nvim/wiki extension list https://github.com/neoclide/coc.nvim/wiki/Using-coc-extensions#implemented-coc-extensions
Locations
~/.config/nvim/coc-settings.json
config ~/.config/coc/extensions/node_modules/${plugin}
plugins installed here ~/.config/coc/memos.json
persisted plugin data
Languages
Languages can be installed dynamically with
:CocInstall coc-python
or automatically likePlug 'neoclide/coc-tsserver', {'do': 'yarn install --frozen-lockfile'}
.
python coc-python ruby/rails coc-solargraph graphql coc-graphql
Install
# archlinux sudo pacman -S \ nodejs \ npm # macos brew install node.js \ npm npm install -g neovimPlugin "https://github.com/neoclide/coc.nvim"
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
Troubleshooting
:CocInfo " print debug info