-
Notifications
You must be signed in to change notification settings - Fork 36.6k
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 <umutsonder@gmail.com>
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 <35480205+roryhen@users.noreply.github.com>
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. |
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.
maybe you should only enable lsps that were installed using ensure_installed
.
This way you will mirror the original behaviour.
i.e.
---@type MasonLspconfigSettings
---@diagnostic disable-next-line: missing-fields
require('mason-lspconfig').setup {
automatic_enable = vim.tbl_keys(servers or {}),
}
My config was broken until I added the changes from this PR. As far as I understand Mason v2 doesn't support the handler approach that was being used before, so none of my LSP configuration was actually being applied. |
If this PR aims to only support nvim 0.11+, then it maybe also should remove the |
Also, maybe I'm just blind, I didn't checkout the PR, but this name variable seems undefined? Edit: my bad, I thought I was on the forks commit list, not on the PRs, where the commit order is inverted. |
I started the PR supporting older versions as well, However most people thought it wasn't necessary because kickstart only support the latest neovim version and having cleaner code would be better for beginners. I didn't touch the clients_supports_method as this pr is only focused on the new LSP API of neovim
It has been fixed. You are looking at an older version of the branch |
I personally love to keep the code free of legacy dependencies, but Ubuntu, Debian and some Fedoras don't yet have 0.11 , maybe someone familiar with the code could contribute an upgrade to the most common distros? https://packages.ubuntu.com/search?keywords=neovim&searchon=names&suite=plucky§ion=all https://packages.debian.org/search?keywords=neovim&searchon=names&suite=stable§ion=all |
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
Summary