aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-02-11 03:38:07 -0800
committerGitHub <noreply@github.com>2025-02-11 03:38:07 -0800
commit891d2f4029259b2790b9aa3ca71ebca0ff3d7eba (patch)
tree136651f6825b8d530f0e607e48674368608dc5ef /runtime/doc
parent3abfaafad255079f39a0843fb1b601db00d739af (diff)
parente8b5dd1e89bfa984e7b943443a291484cba23fac (diff)
downloadrneovim-891d2f4029259b2790b9aa3ca71ebca0ff3d7eba.tar.gz
rneovim-891d2f4029259b2790b9aa3ca71ebca0ff3d7eba.tar.bz2
rneovim-891d2f4029259b2790b9aa3ca71ebca0ff3d7eba.zip
Merge #30860 LSP: symbols_to_items()
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/lsp.txt11
-rw-r--r--runtime/doc/news.txt4
2 files changed, 11 insertions, 4 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index 25ef7f24cc..954d21ec34 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -2376,12 +2376,17 @@ stylize_markdown({bufnr}, {contents}, {opts})
Return: ~
(`table`) stripped content
-symbols_to_items({symbols}, {bufnr}) *vim.lsp.util.symbols_to_items()*
+ *vim.lsp.util.symbols_to_items()*
+symbols_to_items({symbols}, {bufnr}, {position_encoding})
Converts symbols to quickfix list items.
Parameters: ~
- • {symbols} (`lsp.DocumentSymbol[]|lsp.SymbolInformation[]`)
- • {bufnr} (`integer?`)
+ • {symbols} (`lsp.DocumentSymbol[]|lsp.SymbolInformation[]`)
+ list of symbols
+ • {bufnr} (`integer?`) buffer handle or 0 for current,
+ defaults to current
+ • {position_encoding} (`'utf-8'|'utf-16'|'utf-32'?`) default to first
+ client of buffer
Return: ~
(`vim.quickfix.entry[]`) See |setqflist()| for the format
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 90a020bb4d..92492d0448 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -133,6 +133,7 @@ LSP
• |vim.lsp.util.make_position_params()|, |vim.lsp.util.make_range_params()|
and |vim.lsp.util.make_given_range_params()| now require the `position_encoding`
parameter.
+• |vim.lsp.util.symbols_to_items()| now requires the `position_encoding` parameter.
LUA
@@ -277,7 +278,8 @@ LSP
• `:checkhealth vim.lsp` displays the server version (if available).
• Completion side effects (including snippet expansion, execution of commands
and application of additional text edits) is now built-in.
-• |vim.lsp.util.locations_to_items()| sets `end_col` and `end_lnum` fields.
+• |vim.lsp.util.locations_to_items()| and |vim.lsp.util.symbols_to_items()| now
+ sets `end_col` and `end_lnum` fields.
• |vim.lsp.buf.format()| now supports passing a list of ranges
via the `range` parameter (this requires support for the
`textDocument/rangesFormatting` request).