-
-
Notifications
You must be signed in to change notification settings - Fork 335
plugins/lsp: use vim.lsp native API #3204
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
Conversation
7084451
to
9ec1819
Compare
I suspect they are using the new rtp Any file in Alternatively, they may just be setting Note The merge semantics of configurations follow the behaviour of See |
Seems to work fine on my end. |
Looking at
? EDIT: actually, they give an example of setting vim.lsp.config('*', {
capabilities = {
textDocument = {
semanticTokens = {
multilineTokenSupport = true,
}
}
},
root_markers = { '.git' },
}) They also note:
So we'd continue to use |
6dac135
to
2f9a61a
Compare
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.
The diff looks good.
One question and one nit below, but no blockers if CI passes.
I'll briefly test my config against this branch and report back
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.
Tested my config with nixd, seems to be working. Above nits still relevant if you're interested in them.
2f9a61a
to
e0c7fa3
Compare
2d91b58
to
18d4382
Compare
18d4382
to
04a8b80
Compare
04a8b80
to
78f6ff0
Compare
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.
Still works here in latest setup
This comment was marked as resolved.
This comment was marked as resolved.
This comment has been minimized.
This comment has been minimized.
This pull request, with head sha This pull request will be automatically closed by GitHub.As soon as GitHub detects that the sha It is possible for this pull request to remain open if this detection does not happen, this usually happens when a force-push is done on this branch |
@GaetanLepage I think we may have to revert this for a while, as not all nvim-lspconfig configs are updated to work with the new API. Our users are running into issues like:
Which may not be fully resolvable until neovim/nvim-lspconfig#3705 is complete and propagated to nixpkgs. |
Sad. But yes, it is the wisest thing to do I guess. |
This reverts commit 78f6ff0. From PR nix-community#3204
This reverts commit 78f6ff0. From PR nix-community#3204
I haven't looked at the relevant code at all, but would it be possible to have a knob for "use vim.lsp native API" that for now defaults to false? I've submitted a number of bugfixes recently (neovim/neovim#33707, neovim/neovim#33703, neovim/neovim#33702) for the native API that I'd like to test out/benefit from. |
This Pr was reverted, lspconfig doesn't use it again. |
Thanks! 😍
We kinda have that already; we're developing a new way of managing LSP in parallel to the old way staying mostly as-is for now. The new design consists of We're still calling the top-level See: |
Use Neovim's native
vim.lsp
API instead of legacyrequire('lspconfig').*.setup()
.nvim-lspconfig aims to become a bank of configuration for popular language servers.
Its API has been deprecated in favor of Neovim 0.11's new
vim.lsp
native one.Hence, we need to adapt how we configure
nvim-lspconfig
in lua and migrate it to the new API.I have not yet really understand how
nvim-lspconfig
interacts with the native API to inject its configs.Note
This is a parallel effort of #3203
Ultimately, we should be able to use our top-level
lsp
module inplugins.lsp
's (nvim-lspconfig
) implementation.Open questions
plugins.lsp.servers.*.capabilities
? Do we need to provide them tovim.lsp.config
?Resources
Fixes #3201