From e8b5dd1e89bfa984e7b943443a291484cba23fac Mon Sep 17 00:00:00 2001 From: Yi Ming Date: Tue, 11 Feb 2025 17:19:44 +0800 Subject: feat(lsp)!: `symbol_to_item` requires `offset_encoding` --- runtime/doc/lsp.txt | 13 ++++++++----- runtime/doc/news.txt | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 9e6aec4bf7..954d21ec34 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -2376,14 +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[]`) list of - symbols - • {bufnr} (`integer?`) buffer handle or 0 for current, defaults to - current + • {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 8ab001bf94..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 -- cgit