Avimitin / nvim

Useful, maintainable, multi-language supported neovim configuration.
https://avimitin.github.io/nvim
Apache License 2.0
273 stars 48 forks source link

Lsp servers aren't installed on 7.3.1 #50

Closed powr-service closed 2 years ago

powr-service commented 2 years ago

On the latest master with latest nightly neovim I have this custom.lua:

custom.lua local my_config = { -- the global theme settings theme = "github_dimmed", langs = { "bash", "comment", "html", "json", "nix", "dockerfile", "javascript", "css", "ruby", "yaml", { "vim", "vimls" }, { "go", "gopls" }, { "lua", "sumneko_lua" }, { "bash", "bashls" }, { "c", "clangd" }, -- require npm { "css", "cssls" }, -- require npm { "cpp", "clangd" }, -- require npm { "javascript", "eslint" }, -- require npm { "python", "pyright" }, -- require npm { "ruby", "solargraph" }, -- require npm { "yaml", "yamlls" }, -- require npm { "docker", "dockerls" }, -- require npm }, null_ls = { enable_stylua_fmt = false, -- require stylua executable }, autocmd_enable = { fcitx5 = false, -- require fcitx5-remote lastline = true, diff_on_commit = false, -- might mess up your window }, markdown = { -- must be executable preview_browser = "firefox", }, } return my_config
Nvim Info `$nvim --version` output: NVIM v0.8.0-dev Build type: RelWithDebInfo LuaJIT 2.1.0-beta3 Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-j3kVws/neovim-0.8.0~ubuntu1+git202208091232-cd14efd28-66ad461b6=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim-j3kVws/neovim-0.8.0~ubuntu1+git202208091232-cd14efd28-66ad461b6/build/cmake.config -I/build/neovim-j3kVws/neovim-0.8.0~ubuntu1+git202208091232-cd14efd28-66ad461b6/src -I/build/neovim-j3kVws/neovim-0.8.0~ubuntu1+git202208091232-cd14efd28-66ad461b6/.deps/usr/include -I/usr/include -I/build/neovim-j3kVws/neovim-0.8.0~ubuntu1+git202208091232-cd14efd28-66ad461b6/build/src/nvim/auto -I/build/neovim-j3kVws/neovim-0.8.0~ubuntu1+git202208091232-cd14efd28-66ad461b6/build/include Compiled by buildd@lcy02-amd64-006 Features: +acl +iconv +tui See ":help feature-compile" system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/share/nvim" Run :checkhealth for more info OS: Ubuntu 20.04.4 LTS on Windows 10 x86_64 Kernel: 5.10.102.1-microsoft-standard-WSL2

Nodejs versions are managed by asdf and for global it's set to 16.14.2.

LspInfo output:

 Language client log: /home/azaza/.local/state/nvim/lsp.log
 Detected filetype:   lua

 0 client(s) attached to this buffer: 

 Other clients that match the filetype: lua

 Config: sumneko_lua
    filetypes:         lua
    root directory:    /home/azaza/.dotconf/wsl/nvim/.config/nvim
    cmd:               lua-language-server
    cmd is executable: Unable to find executable. Please check your path and ensure the server is installed
    autostart:         true
    custom handlers:   textDocument/hover, textDocument/signatureHelp

 Configured servers list: sumneko_lua, clangd, yamlls, eslint, cssls, dockerls, bashls, vimls, pyright, gopls, solargraph
Avimitin commented 2 years ago

I don't trust the LSP installer plugin anymore. The upstream always abandons the old project and stops maintaining it. So I remove it in commit https://github.com/Avimitin/nvim/commit/564b7805eb34e4f831dcd88ed1dab49940cafed8.

Besides, managing that amount of the executable by an editor plugin is not suggested: the environment might be messed up by the plugin if they push some mistake to the master branch, and those prebuilt executable might got compatibility issues on your machine because they are built in the GitHub action (Incompatible glibc, share library...etc), and the last and the most important reason is that we cannot fully trust an executable file downloaded by an editor plugin. There have been many examples of supply chain security issues.

So, I recommend you use your system package manager to install those LSP servers. Your system package manager is always a trusted and reliable source. They are born to install/upgrade/uninstall packages. In my opinion, I don't want another pip/npm-like plugin to introduce a great deal of uncertainty. If you still prefer "automatically setup", you can try mason.nvim. But, please rethink carefully.