Commit Graph

43 Commits

Author SHA1 Message Date
chupson
b4da76be54 fix(lsp): stop using deprecated client.supports_method function (#3468)
Some checks failed
Tests / unit tests (brew update && brew install ripgrep, macos-latest, nightly) (push) Has been cancelled
Tests / unit tests (brew update && brew install ripgrep, macos-latest, v0.10.0) (push) Has been cancelled
Tests / unit tests (brew update && brew install ripgrep, macos-latest, v0.9.5) (push) Has been cancelled
Tests / unit tests (choco install ripgrep, windows-2022, nightly) (push) Has been cancelled
Tests / unit tests (choco install ripgrep, windows-2022, v0.10.0) (push) Has been cancelled
Tests / unit tests (choco install ripgrep, windows-2022, v0.9.5) (push) Has been cancelled
Tests / unit tests (sudo apt-get update && sudo apt-get install -y ripgrep, ubuntu-22.04, nightly) (push) Has been cancelled
Tests / unit tests (sudo apt-get update && sudo apt-get install -y ripgrep, ubuntu-22.04, v0.10.0) (push) Has been cancelled
Tests / unit tests (sudo apt-get update && sudo apt-get install -y ripgrep, ubuntu-22.04, v0.9.5) (push) Has been cancelled
Linting and style checking / Luacheck (push) Has been cancelled
Linting and style checking / stylua (push) Has been cancelled
2025-05-11 21:21:28 -04:00
Will Lillis
a4ed82509c fix(lsp): don't return negative values from item_to_location (#3433)
Problem: If `telescope.builtin.__lsp.definition` is invoked on an
empty file, `item_to_location` returns a location with `-1` as a
its column value.

Solution: Respectively return 0 if the line or column number is <= 0
2025-03-18 21:05:22 -04:00
Dusty Pomerleau
a17d611a0e fix(lsp): add default position encoding when calling symbols_to_items() (#3418) 2025-03-16 20:30:08 -04:00
Rocky
2eca9ba220 fix: offset_encoding is required now in make_position_params (#3368)
Adapt to the upstream change
629483e24e
2024-11-29 13:54:06 +01:00
Tristan Knight
85922dde37 refactor: adapt to deprecated jump_to_location (#3344) 2024-10-29 01:22:28 +00:00
James Trew
f06e7a8871 Revert "feat(lsp): use native lsp handlers for some pickers" (#3349)
* Revert "feat(lsp): use native lsp handlers for some pickers (#3335)"

This reverts commit 6c468ff9ec.

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

---------

Co-authored-by: Github Actions <actions@github>
2024-10-29 01:11:39 +00:00
James Trew
6c468ff9ec feat(lsp): use native lsp handlers for some pickers (#3335)
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.
2024-10-29 01:03:54 +00:00
Tristan Knight
37dc9233a4 fix: add shim for vim.lsp.util._str_byteindex() (#3338)
Will be removed in Nvim 0.11: https://github.com/neovim/neovim/pull/30915
2024-10-26 16:33:10 +02:00
James Trew
cfaf68420e fix(lsp): handle empty call hierarchy items (#3288)
- Added a check for empty call hierarchy items using vim.tbl_isempty.
- Fixed the return value to correctly return the chosen item from the
  list.
2024-09-12 01:07:47 +00:00
James Trew
43c47ebc49 fix(lsp): support multiple servers for dynamic symbols (#3248) 2024-08-13 01:33:53 +00:00
Enric Lluelles
3b1600d0fd feat(lsp): support requests to many servers for some pickers (#3211)
* Implement list_or_jump_all and use it

* Update lua/telescope/builtin/__lsp.lua

Co-authored-by: James Trew <66286082+jamestrew@users.noreply.github.com>

* Make list_or_jump listen to multiple lsps at once

* Don't fail early if an lsp errors

---------

Co-authored-by: James Trew <66286082+jamestrew@users.noreply.github.com>
2024-08-02 01:12:41 +00:00
James Trew
61a4a61536 fix(lsp): if_nil <0.10 compat (#3184) 2024-06-25 10:30:33 -04:00
James Trew
58ec6eca1c fix(builtin.lsp): respect file_ignore_patterns opt for direct jumps (#3173) 2024-06-25 03:15:17 +00:00
Axel Dahlberg
f12b15e1b3 feat(lsp): notify list_or_jump when no results (#3158) 2024-06-09 14:10:46 +00:00
Lonzo_ghf
3a743491e5 fix(lsp.reference): only filter the current line of the current filname (#3154)
* fix(lsp.reference): Only filter the current line of the current filname

fix(lsp.reference): Only filter the current line of the current filname when include_current_line=false

* fix(lsp.reference): Only filter the current line of the current filname

* run stylua

---------

Co-authored-by: James Trew <j.trew10@gmail.com>
2024-06-08 02:32:45 +00:00
Lawrence Ho
dfa230be84 fix(lsp): handle URI in item_to_location (#3144) 2024-05-29 19:24:09 +02:00
James Trew
127159a52f fix(lsp.reference): single reference direct jump (#3137)
* fix(lsp.reference): single reference direct jump

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

---------

Co-authored-by: Github Actions <actions@github>
2024-05-29 01:34:22 +00:00
Christian Clason
33f04c3a86 fixup: adapt to deprecations in Nvim 0.10 (#3112) 2024-05-17 18:10:21 +02:00
Christian Clason
bbdbb7593f fix: adapt to Nvim deprecations in 0.10 (#3109) 2024-05-17 14:39:12 +02:00
James Trew
6f6bb80655 Revert "refactor(lsp): simplify list_to_jump (#3099)" (#3101)
This reverts commit e9be6bb7a7.
2024-05-14 14:34:00 +00:00
James Trew
e9be6bb7a7 refactor(lsp): simplify list_to_jump (#3099)
* refactor(lsp): simplify `list_to_jump`

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

---------

Co-authored-by: Github Actions <actions@github>
2024-05-14 04:10:11 +00:00
James Trew
c8b69caae5 fix(lsp): add missing offset_encoding param (#3098) 2024-05-14 02:54:56 +00:00
Adrian Göransson
df4dd3089d fix(lsp.references): include_current_line option regression (#3091)
* Fix jump regression in LSP references action handler

This change restores the possibility to exclude the current line when
invoking the lsp_references picker.

- opts.include_current_line is by default unset, so the previous
  equality check would fail unless the option was set explicitly.
- vim.api.nvim_win_get_cursor() returns both line and column, so it
  can't be directly compared with the returned line number.
- The actual comparison was expecting quickfix-like items, when in
  actuality, we were dealing with raw LSP location objects.

* lsp: Pass offset_encoding to action_handlers

* LSP: Action handlers take both locations and items

* LSP: Rename (flattened_)results → locations

* LSP: Early return in list_or_jump
2024-05-14 02:27:57 +00:00
James Trew
c816406bd5 fix(builtin.lsp): bad check for jump_type option (#2991) 2024-03-18 15:39:57 +00:00
James Trew
5730b950d9 fix(builtin.lsp): extra No Name buffer opening with jump_type (#2990) 2024-03-18 13:41:56 +00:00
James Trew
8cd58c6e81 fix(lsp): incoming/outgoing_call range locations (#2985)
Previous implementation uses the incorrect lsp result fields for
generating call site locations resulting in incomplete and incorrect
results.
2024-03-18 01:09:56 +00:00
James Trew
a5b69afa48 refactor(lsp): consolidate some picker jump logic (#2935) 2024-02-23 03:15:55 +00:00
Hicro
20bf20500c fix: nil problem when jump to location when tab drop is set as jump_type (#2760)
* feat(lsp_definitions): adding `tab drop` as `jump_type`

* feat(lsp-jump-types): `tab drop` for LSP features

Now, you're able to use `tab drop` as `jump_type` for these LSP
features: references, type definitions, definitions an implementations.

* fix(docs): reordering `tab drop` option

* feat: generate docs

* fix: nil problem with `vim.uri_to_fname`

* fix: removing warning about `file_uri` variable not being used

---------

Co-authored-by: Simon Hauser <simon.hauser@helsinki-systems.de>
2023-11-06 02:06:57 +00:00
Hicro
060fedfdea feat(lsp-jump-type): tab drop as new jump_type option for go-to LSP pickers (#2751) 2023-10-23 09:41:29 +02:00
AI
5a747a9587 fix(lsp): call hierarchy results processing (#2728) 2023-10-07 20:05:04 +00:00
TJ DeVries
47c755d737 fix: handle non-file uris for lsp (#2604) 2023-07-17 13:20:09 -04:00
Folke Lemaitre
276362a802 feat(lsp): added support for dynamic capabilities (#2594) 2023-07-06 18:30:43 -04:00
暮晨
6dec8cf723 feat(lsp): add 'reuse_win' for reuse window options (#2454) 2023-05-24 11:21:16 +02:00
Azad
233cd6ad0d fix(lsp.definitions): compare file uri with targetUri (#2514) 2023-05-24 10:48:24 +02:00
Maksym Klishevych
942fe5faef feat(treesitter): symbols & ignore symbols options (#2338)
* feat(treesitter): symbols & ignore symbols options

* renamed the function passed to utils.filter_symbols

---------

Co-authored-by: Maksym Klishevych <max@klishevy.ch>
2023-03-22 09:49:55 -04:00
Luyu Huang
5d9658c39d fix: apply jump_type only if the definition file is different from the current file (#2324) 2023-02-19 13:32:37 +01:00
Andreas Guth
7a4ffef931 fix(lsp_references): not changing files if only 1 result (#2229) 2022-11-11 08:15:29 +01:00
Gutyina Gergő
cc77713294 feat: add jump_type option for lsp_references (#2218) 2022-11-06 17:43:01 +01:00
Marcus Caisey
4a43d13c95 fix: don't include current line in lsp references if current_line=false (#2165) 2022-09-17 10:14:53 +02:00
Christoph Blessing
2e05e63cdf fix: error due to concatenating table to string (#2108)
This commit fixes a bug that lead to an error because we tried to
concatenate a table (`err`) to a string. Now we concatenate
`err.message` (a string) to the string.
2022-08-01 18:06:28 +02:00
Simon Hauser
f838695459 chore: reformat with stylua 0.14.0 2022-07-07 08:27:46 +02:00
Simon Hauser
2b1da47deb chore: make to_fuzzy_refine configurable (#2034) 2022-07-03 21:39:24 +02:00
Simon Hauser
0621c1c6ba break: prefix internal files and add deprecation messages (#2032) 2022-07-01 22:20:12 +02:00