-
Notifications
You must be signed in to change notification settings - Fork 38.3k
feat: add support for new LSP config API in Neovim 0.11+ #1475
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
Do we really need backward compatibility with Neovim 0 10? I'd consider going with a lighter, happy-path solution. Since the project mainly targets newcomers and servers educational purposes, they'd likely prefer to avoid dealing with legacy approaches. |
I think that would be the right approach as well. The reason I intended to maintain backwards compatibility is that some parts of the code is still trying to maintain 0.10 like the |
There is also the problem new syntax not supporting all lsp configs. For example tailwindcss requires the old setup. Could be a good idea to delay this until most lsp configs migrate. |
|
Signed-off-by: Umut Sahin Onder <[email protected]>
In my opinion, we shouldn't bother with backwards compatibility since Kickstart is mostly aimed at beginners who will download the latest version of Neovim as per the instructions in the repo readme |
I have removed backwards compatibility and added useful comments for LSPs that still require the old setup |
This comment was marked as resolved.
This comment was marked as resolved.
I couldn't replicate the issue. I do not think it would be related to these changes as conform.nvim does not use an LSP. In any case If you could check your conform logs by using |
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Rory Hendrickson <[email protected]>
AFAIK
I've been updating my old neovim configs with the latest kickstart but the LSP settings weren't reflected in |
If we were to move LSP configs to their own file, I don't know how mason-tool-installer would work without the servers table maybe by iterating over file names? In your config I see that you still have the servers table. If It is still gonna be preset wouldn't be better to use vim.lsp.config with a loop (like my first hunk) rather than having 2 separate places for LSP servers? |
As mentioned in previous conversations, Mason v2 has started introducing a significant delay during startup. For now, I’ve pinned the Mason version to avoid this issue. From my testing, the problem appears to be related to mason-tool-installer; without it, I don’t experience any delays. It would be helpful to hear from someone with more insight into this before proceeding further with Mason v2. |
Hi @spundun , Neovim also provides a prebuilt package: AppImage and tarball. We don't have to build Neovim for the distrubution. Please check out this link: https://github.com/neovim/neovim/releases/tag/v0.11.2 |
Hi @guru245 , Thanks for the response. That's a cool new thing I learned today :). The README.md just says "If you are experiencing issues, please make sure you have the latest versions.". Since kickstart puts priority on being new-user-friendly, I'd suggest you add more detailed guidelines there. To many users, "make sure you have the latest version" might just mean making sure you have all the latest software updates from your package manager, especially if you're on the latest version of some standard OS. Maybe adding detailed instructions along the lines... if |
handlers has been removed in v2: https://github.com/mason-org/mason-lspconfig.nvim/blob/main/CHANGELOG.md#200-2025-05-06 Watch this PR: nvim-lua/kickstart.nvim#1475
I spent way too long trying to figure out why inlay hints wouldn't appear anywhere! Turns out my LSP settings weren't even being loaded. I'm super glad I found this PR! |
Based on PR nvim-lua#1475 : feat: add support for new LSP config API in Neovim 0.11+ link : nvim-lua#1475
* Only use pylint as the pylsp's linter. ref: nvim-lua#1475 nvim-lua#1475
any updates on this pr? the current implementation of |
Based off this kickstart.nvim PR: nvim-lua/kickstart.nvim#1475
Based on nvim-lua#1475
I recommend #1663 over this PR. It states clearly what it does, it does it correctly and stays to the point. This one is actually dealing with mason-lspconfig 2.0, rather than nvim 0.11, does more than it says and pushes authors preferences. |
---@type MasonLspconfigSettings | ||
---@diagnostic disable-next-line: missing-fields | ||
require('mason-lspconfig').setup { | ||
automatic_enable = vim.tbl_keys(servers or {}), |
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.
Despite that , I still prefer declarativly specifying all the LSPs in the config file, instead of downloading them using the mason interface. This way I can commit those LSPs and have a reproducible setup. This is the same reason I commit the
lazy-lock.json
file.
This is unacceptable for plugins that need to set additional settings before the LSP is setup. For one - nvim-java for jdtls. It is also absolutely unnecessary.
Pushing your preferences into a public repository is not very kind to others with different preferences.
I find #1663 better than this one.
Is there anything major preventing this from being merged? I merged this patchset into my personal config and everything works fine. |
Summary