neovim0.5版本更新比较大,有一些大佬开始抛弃coc,而使用native lsp了。学习一下记录一下。
我参考的是:
https://github.com/craftzdog/dotfiles-public
额外执行
npm i -g typescript typescript-language-server
或者
yarn global add typescript typescript-language-server
错误解决
tree-sitter CLI not found: tree-sitter
is not execu
table!
tree-sitter CLI is needed because swift
is marked t
hat it needs to be generated from the grammar definit
ions to be compatible with nvim!
安装
yarn global add tree-sitter
或者
wget https://hub.fastgit.org/tree-sitter/tree-sitter/releases/download/v0.20.0/tree-sitter-linux-x64.gz
gzip -d tree-sitter-linux-x64.gz
diagnostic-languageserver
完全使用https://github.com/craftzdog/dotfiles-public的nvim配置后,运行后有如下的错误:
cmd [“diagnostic-languageserver”] is not executable.
项目地址:
https://github.com/iamcco/diagnostic-languageserver
报错解决
yarn global add diagnostic-languageserver
安装以后,确实不在报错了。
但是也没有感觉出来有什么效果。
看说明这个插件应该是用来提供shell脚本语法检查的。但是我编写.sh文件没有任何提示。
打开多个文件,顶上的选项卡不见了
解决办法:
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
glepnir/lspsaga.nvim
基于neovim 内置lsp 的轻量级lsp 插件,具有高性能UI。
点评:
非常酷,超出了我去nvim插件的认知范围。真华丽,整的不像是命令行程序一样。
https://github.com/glepnir/lspsaga.nvim
不同语言的LSP
https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md
截止文章编写的日期,已经支持以下语言LSP
- als
- angularls
- ansiblels
- arduino_language_server
- bashls
- beancount
- bicep
- ccls
- clangd
- clojure_lsp
- cmake
- codeqlls
- crystalline
- cssls
- dartls
- denols
- dhall_lsp_server
- diagnosticls
- dockerls
- dotls
- efm
- elixirls
- elmls
- ember
- erlangls
- flow
- fortls
- fsautocomplete
- gdscript
- ghcide
- gopls
- graphql
- groovyls
- haxe_language_server
- hie
- hls
- html
- intelephense
- java_language_server
- jdtls
- jedi_language_server
- jsonls
- julials
- kotlin_language_server
- lean3ls
- leanls
- lemminx
- metals
- mint
- nimls
- ocamlls
- ocamllsp
- omnisharp
- pasls
- perlls
- perlpls
- phpactor
- powershell_es
- prismals
- puppet
- purescriptls
- pylsp
- pyright
- r_language_server
- racket_langserver
- rescriptls
- rls
- rnix
- rome
- rust_analyzer
- scry
- serve_d
- solang
- solargraph
- sorbet
- sourcekit
- sqlls
- sqls
- stylelint_lsp
- sumneko_lua
- svelte
- svls
- tailwindcss
- taplo
- terraformls
- texlab
- tflint
- theme_check
- tsserver
- vala_ls
- vimls
- vls
- volar
- vuels
- yamlls
- zeta_note
- zls