At the moment, every time I install a new LPS server using nvim-lsp-installer, I add an entry to my .zshenv
, so that the bin folder of the server is available to $PATH
:
PATH="$HOME/.local/share/nvim/lsp_servers/python/node_modules/.bin:$PATH"
The nvim-lsp-installer documentation recommends setting up the path with the cmd
option in each individual LSP configuration. The thing is that I have never seen that in any of my favorite dotfiles from my favorite fellow neovimers that use lsp-config.
Am I missing something? Is there a way to automate the process? Is there a way to add the bin folders to $PATH
during server installation? Or am I doing it the "normal" way?
You shouldn't need to modify your PATH
manually when using nvim-lsp-installer. The minimal setup recommends the following (there's more in the README):
local lsp_installer = require("nvim-lsp-installer")
lsp_installer.on_server_ready(function (server)
server:setup {}
end)
By setting up the server via the above interface, nvim-lsp-installer will be able to modify the settings with the necessary properties before passing it onwards to lspconfig.
If you'd like to be able to run the language server executables from a shell, you'd probably be better off installing them manually into a location on your PATH
rather than going through nvim-lsp-installer.