aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorTom Praschan <13141438+tom-anders@users.noreply.github.com>2023-09-07 10:12:02 +0200
committerGitHub <noreply@github.com>2023-09-07 10:12:02 +0200
commit131a1ee82d15ce9d1356a46117c9a1651947d4b8 (patch)
tree2560b881a308fb508b71060cb005403e3240f040 /runtime/doc
parentec753cf40db4d326c2fbbf5e5be0d249be561a41 (diff)
downloadrneovim-131a1ee82d15ce9d1356a46117c9a1651947d4b8.tar.gz
rneovim-131a1ee82d15ce9d1356a46117c9a1651947d4b8.tar.bz2
rneovim-131a1ee82d15ce9d1356a46117c9a1651947d4b8.zip
feat(lsp): add original LSP Location as item's user_data in locations_to_items (#23743)
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/lsp.txt3
-rw-r--r--runtime/doc/news.txt3
2 files changed, 6 insertions, 0 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index 4c0ad1e035..d2d7e9faac 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -1751,6 +1751,9 @@ locations_to_items({locations}, {offset_encoding})
Returns the items with the byte position calculated correctly and in
sorted order, for display in quickfix and location lists.
+ The `user_data` field of each resulting item will contain the original
+ `Location` or `LocationLink` it was computed from.
+
The result can be passed to the {list} argument of |setqflist()| or
|setloclist()|.
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 7607d218c3..972f37f0e9 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -162,6 +162,9 @@ The following new APIs and features were added.
• The |:terminal| command now accepts some |:command-modifiers| (specifically
|:horizontal| and those that affect splitting a window).
+• |vim.lsp.util.locations_to_items()| sets the `user_data` of each item to the
+ original LSP `Location` or `LocationLink`.
+
==============================================================================
CHANGED FEATURES *news-changed*