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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM