Ubuntu安装/配置Nvim+coc.vim

安装前需要的准备

更换国内软件源(我用的中科大源)

安装nodejs npm

sudo apt isntall nodejs npm

安装yarn

sudo npm i -g yarn

安装neovim

sudo apt install nvim

配置vim-plug

在[~/.config/nvim/]目录创建init.vim配置文件,创建文件夹[autoload][plugged]
mkdir autoload plugged
vi init.vim
键入插入以下内容

call plug#begin()
Plug 'neoclide/coc.nvim', {'branch': 'release'}
call plug#end()

使用命令:wq保存并退出

进入nvim,在命令模式执行:PlugInstall

可能会遇到的错误:

[coc.nvim] "node" is not executable
ERROR: Javascript entry not found, please compile coc.nvim by esbuild. - ERROR: service could
退出nvim,此时进入[ ~/.local/share/nvim/plugged/coc.nvim],执行以下命令:
yarn install
yarn build

posted @ 2022-03-20 00:35  光着俩小脚丫  阅读(2130)  评论(0编辑  收藏  举报