We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/kabouzeid/nvim-lspinstall is a convenient plugin to install LSP servers. They end up in a separate directory outside of $PATH (~/.local/share/nvim/lspinstall/python/./node_modules/.bin/pyright-langserver in my case), but https://github.com/kabouzeid/nvim-lspinstall/blob/54b439241e83e0a9ce8f6bcdf3b2c560a2328792/lua/lspinstall.lua#L94 corrects the default cmd for lspconfig to point to that location. However py_lsp doesn't pick up on it for some reason, perhaps overriding cmd or cmd_cwd in default_config?
$PATH
~/.local/share/nvim/lspinstall/python/./node_modules/.bin/pyright-langserver
cmd
lspconfig
py_lsp
cmd_cwd
default_config
This is with py_lsp installed and used to set up Pyright:
And this is with py_lsp disabled: (note cmd)
The text was updated successfully, but these errors were encountered:
@d-miketa Hey thank you for your response and sorry for responding so late.
I could indeed reproduce that behaviour. The problem here is not that the language server is not found, but the way lspconfig tries to call it.
The lspinstall README says to use following snippet for initialising the install server:
require'lspinstall'.setup() -- important local servers = require'lspinstall'.installed_servers() for _, server in pairs(servers) do require'lspconfig'[server].setup{} end
The servers table includes the name of the language, not the name of the language server, something like {"rust", "python", "lua"}.
servers
{"rust", "python", "lua"}
So in the end what is called is:
require'lspconfig'['python'].setup()
where cmd is accordingly updated for the custom install path.
and not:
require'lspconfig'['pyright'].setup()
I will probably put in some checks and look that "python" is passed to lspconfig and not "pyright" when it is installed through lspInstall
"python"
"pyright"
lspInstall
Sorry, something went wrong.
Still not working...
Successfully merging a pull request may close this issue.
https://github.com/kabouzeid/nvim-lspinstall is a convenient plugin to install LSP servers. They end up in a separate directory outside of
$PATH
(~/.local/share/nvim/lspinstall/python/./node_modules/.bin/pyright-langserver
in my case), but https://github.com/kabouzeid/nvim-lspinstall/blob/54b439241e83e0a9ce8f6bcdf3b2c560a2328792/lua/lspinstall.lua#L94 corrects the defaultcmd
forlspconfig
to point to that location. Howeverpy_lsp
doesn't pick up on it for some reason, perhaps overridingcmd
orcmd_cwd
indefault_config
?This is with
![image](https://user-images.githubusercontent.com/320321/132914963-c02a6a99-bc7c-4732-b5d1-641157c44a41.png)
![image](https://user-images.githubusercontent.com/320321/132915196-003f1a0a-d53f-4e58-bdfd-b4329d92c078.png)
py_lsp
installed and used to set up Pyright:And this is with
![image](https://user-images.githubusercontent.com/320321/132915283-efdb8898-f6be-4694-a77b-9f70efbf5738.png)
py_lsp
disabled: (notecmd
)The text was updated successfully, but these errors were encountered: