Skip to content
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

feat(lsp): use native lsp handlers for some pickers #3335

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

jamestrew
Copy link
Contributor

@jamestrew jamestrew commented Oct 23, 2024

Switch the following pickers to use the native neovim lsp handler functions using the on_list option:

  • references -> vim.lsp.buf.references
  • definitions -> vim.lsp.buf.definition
  • type_definitions -> vim.lsp.buf.type_definition
  • implementations -> vim.lsp.buf.implementation

This offloads the request and response handling off the neovim.
This also let's responses pass through any custom handlers registered via vim.lsp.handlers (currently not functional on neovim nightly).

This only affects users on neovim 0.11+. The on_list option was introduced in nvim 0.10 but only recently in 0.11, has neovim's vim.lsp.buf.* functions added improved support for responses from multiple language servers.

closes #3336

Switch the following pickers to use the native neovim lsp handler
functions using the `on_list` option:

- `references` -> `vim.lsp.buf.references`
- `definitions` -> `vim.lsp.buf.definition`
- `type_definitions` -> `vim.lsp.buf.type_definition`
- `implementations` -> `vim.lsp.buf.implementation`

This offloads the request and response handling off the neovim. This
also let's responses pass through any custom handlers registered via
`vim.lsp.handlers`.

This only affects users on neovim 0.11+. The `on_list` option was
introduced in nvim 0.10 but only recently in 0.11, has neovim's
`vim.lsp.buf.*` functions added improved support for responses from
multiple language servers.
@jamestrew jamestrew merged commit 6c468ff into nvim-telescope:master Oct 29, 2024
12 checks passed
@jamestrew jamestrew deleted the lsp-on-list branch October 29, 2024 01:03
jamestrew added a commit that referenced this pull request Oct 29, 2024
jamestrew added a commit that referenced this pull request Oct 29, 2024
* Revert "feat(lsp): use native lsp handlers for some pickers (#3335)"

This reverts commit 6c468ff.

* [docgen] Update doc/telescope.txt
skip-checks: true

---------

Co-authored-by: Github Actions <actions@github>
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.

vim.lsp.util.jump_to_location got deprecated in neovim HEAD
1 participant