-
Notifications
You must be signed in to change notification settings - Fork 37.1k
feat: improved lsp setup for nvim > 0.11 #1590
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I quite like the idea of teaching how to use servers that were not installed by mason, so I think I prefer this over #1475 (even though it is also great :)
Though I think the formatting changes should be left out of this PR.
Also, I left a couple of suggestions for minor improvements.
Add lua_ls annotations for improved hover experience and replace vim.fn.empty() with vim.tbl_isempty()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove the formatting changes?
Other that everything looks great 😄
Referring to nvim-lua#1590
Referring to nvim-lua#1590
Just an FYI, I have ported this fixes to my kickstart base config. after adding the loop to call |
It's something I'm experiencing with lots of LSPs installed via Mason with |
The aim of this change is to provide a much clearer distinction between how servers are installed & configured (either directly via Mason or manually). This is a slight alternative to this excellent PR for LSP configuration for neovim > 0.11 onwards.
Since the new
mason-lspconfig
changes enable all servers installed via Mason by default, this might cause confusion for newcomers around server enable if they had a language server installed manually but wanted to re-use the defaultnvim-lspconfig
configs.Furthermore, not all language servers might be available on Mason for download - however they might already have default configs available on
nvim-lspconfig
for re-use (example) or have neither available on Mason andnvim-lspconfig
.I'm hoping another benefit of this change is that it should also aid in reducing burden on the mason & nvim-lspconfig maintainers when it comes to answering these specific kind of lsp questions.
As always, I'm open to any feedback here. I'm not too fussed if the above linked PR gets merged over this, but wanted to float this idea by the maintainers and community to gather any & all feedback.
Cheers! 🙂
Minor Changes: