Skip to content

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

umutondersu
Copy link

@umutondersu umutondersu commented Apr 16, 2025

Summary

  • Added support for the new LSP configuration API introduced in Neovim 0.11+
  • Maintains backward compatibility for Neovim 0.10 and below

@ro0gr
Copy link

ro0gr commented Apr 17, 2025

Kickstart.nvim targets only the latest 'stable' and latest 'nightly' of Neovim.

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.

@umutondersu
Copy link
Author

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 client_supports_method. Depending on the others reaction I would also be in favor of removing it.

@umutondersu
Copy link
Author

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.

@nickgnd
Copy link

nickgnd commented Apr 17, 2025

Hey everyone 👋
I remember a few related conversations that happen lately on this topic, let me share them here

#1458
#1331

I hope they can be useful, cheers ✌️

@umutondersu
Copy link
Author

Hey everyone 👋 I remember a few related conversations that happen lately on this topic, let me share them here

#1458 #1331

I hope they can be useful, cheers ✌️

  • This setup config does not clash with blink.cmp so in that sense It should be okay.
  • I would be able to support this in an ongoing basis
  • I think using the native way would provide a better experience for newbies but that's up to debate

@kaezrr
Copy link
Contributor

kaezrr commented Apr 20, 2025

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

@umutondersu
Copy link
Author

I have removed backwards compatibility and added useful comments for LSPs that still require the old setup

@iton0

This comment was marked as resolved.

@umutondersu
Copy link
Author

Messing around with this and found that this will not respect the lsp_format = "fallback" option in the conform.nvim config. To replicate:

1. comment out the stylua formatter line from conform.nvim config

2. save and reload neovim

3. overindent a line or any other formatting change

4. write file

For me it did not fallback on the lua_ls server for formatting.

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 :ConformInfo It could reveal more info about the issue.

@iton0

This comment has been minimized.

Co-authored-by: Rory Hendrickson <35480205+roryhen@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

9 participants