Skip to content
New issue

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

No active LSP with not-included LSP servers #42

Closed
techapostle opened this issue May 5, 2022 · 6 comments
Closed

No active LSP with not-included LSP servers #42

techapostle opened this issue May 5, 2022 · 6 comments

Comments

@techapostle
Copy link
Contributor

Before the last 1 or 2 commits, I could edit c++, python, and java files with the LSP servers that I installed in addition to your included ones. I could do this without creating any additional config files of my own. Now though, I can't use clangd or pyright or any other LSP server that isn't included with your package. Any guidance on how I can enable/configure these LSP servers?

@ecosse3
Copy link
Owner

ecosse3 commented May 5, 2022

Hi. Yes, that's right - now LSP servers installed via lsp-installer are not enabled automatically. That was a breaking change in nvim-lsp-installer announced here: williamboman/nvim-lsp-installer#636

Now, you always have to call setup function of specific lspconfig server in order to enable it. You don't need to install it by yourself because it will be installed automatically.

@crakton
Copy link

crakton commented May 7, 2022

Hi. Yes, that's right - now LSP servers installed via lsp-installer are not enabled automatically. That was a breaking change in nvim-lsp-installer announced here: williamboman/nvim-lsp-installer#636

Now, you always have to call setup function of specific lspconfig server in order to enable it. You don't need to install it by yourself because it will be installed automatically.

HI. Based on @techapostle complaint. I don't understand your answer to it. I want to enable lsp server according to the README file but when I navigated to the 'lua/lsp/config.lua' I can not find any related line that concerns lsp-servers.
I tried using :TSInstall maintained but here is the error am getting:


E5108: Error executing lua ...er/start/nvim-treesitter/lua/nvim-treesitter/install.lua:373: Parser not available for language maintained
stack traceback:
[C]: in function 'get_parser_install_info'
...er/start/nvim-treesitter/lua/nvim-treesitter/install.lua:373: in function 'install_lang'
...er/start/nvim-treesitter/lua/nvim-treesitter/install.lua:419: in function 'run'
[string ":lua"]:1: in main chunk


I really love the effort from this project but I do seems to get along with lua script since am a noob.
What should I do to get the lsp server to work with my React projects?

@techapostle
Copy link
Contributor Author

the TSInstall command is for TreeSitter which provides additional syntax highlighting for your code. It's not related to the installation of LSP servers. Running :checkhealth may give you more insight into the error.

@techapostle
Copy link
Contributor Author

@ecosse3 Thank you for your reply. I looked over the link provided and it seems like I'm supposed to call that function inside your lsp/config.lua file. Is that correct?

@ecosse3
Copy link
Owner

ecosse3 commented May 8, 2022

@techapostle I have changed it a bit with v1.6.0 release and updated README.

You can edit lua/lsp/setup.lua file now and just another lspconfig.<server>.setup {} function. LSP server will be installed automatically and enabled.

In case you don't want any merge conflicts with Ecovim in future, you can create your own lua file and call lspconfig setup functions there. Then just require it at the end of init.lua as you want.

You can check installed LSP servers by :LspInstallInfo.

Let me know if that works for you!

@techapostle
Copy link
Contributor Author

@ecosse3 that works great. Thanks!

@ecosse3 ecosse3 closed this as completed May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants