Coc.nvim install: Difference between revisions

From wikinotes
(Created page with "<syntaxhighlight lang="vim"> # archlinux sudo pacman -S \ nodejs \ npm # macos brew install node.js \ npm npm install -g neovim </syntaxhighlight> <syntaxhighlight...")
 
No edit summary
 
Line 1: Line 1:
<syntaxhighlight lang="vim">
= Install =
<blockquote>
os
<syntaxhighlight lang="bash">
# archlinux
# archlinux
sudo pacman -S \
sudo pacman -S \
Line 9: Line 12:
   node.js \
   node.js \
   npm
   npm
</syntaxhighlight>


npm
<syntaxhighlight lang="bash">
npm install -g neovim
npm install -g neovim
</syntaxhighlight>
</syntaxhighlight>


vim
<syntaxhighlight lang="vim">
<syntaxhighlight lang="vim">
" install coc
Plug "https://github.com/neoclide/coc.nvim", {'branch': 'release'}
Plug "https://github.com/neoclide/coc.nvim", {'branch': 'release'}
</syntaxhighlight>
</blockquote><!-- Install -->


" install coc languages
= Install Extensions (languages) =
 
<blockquote>
<syntaxhighlight lang="vim">
" NOTE: technically this is supposed to work, but it doesn't for all languages
" NOTE: technically this is supposed to work, but it doesn't for all languages
" Plug 'https://github.com/neoclide/coc-tsserver', {'do': 'yarn install --frozen-lockfile'}
" Plug 'https://github.com/neoclide/coc-tsserver', {'do': 'yarn install --frozen-lockfile'}
Line 27: Line 36:


</syntaxhighlight>
</syntaxhighlight>
 
</blockquote><!-- Install Extensions (languages) -->
{{ NOTE |
Officially, installing servers can be done from vim-plug, but I have not had success with this.
 
<code>CocInstall</code> works every time. It's probably best to check for files on disk.
}}

Latest revision as of 15:29, 28 December 2021

Install

os

# archlinux
sudo pacman -S \
  nodejs \
  npm

# macos
brew install
  node.js \
  npm

npm

npm install -g neovim

vim

Plug "https://github.com/neoclide/coc.nvim", {'branch': 'release'}

Install Extensions (languages)

" NOTE: technically this is supposed to work, but it doesn't for all languages
" Plug 'https://github.com/neoclide/coc-tsserver', {'do': 'yarn install --frozen-lockfile'}

if !(isdirectory($HOME."/.config/coc/extensions/node_modules/coc-sh"))
  CocInstall coc-sh
endif