refactor(lsp): deprecate util methods (#25400)

This commit is contained in:
Maria José Solano
2023-09-29 08:37:14 -07:00
committed by GitHub
parent af7d317f3f
commit 9ed830a3ca
4 changed files with 7 additions and 29 deletions

View File

@@ -142,6 +142,8 @@ LSP FUNCTIONS
- *vim.lsp.get_active_clients()* Use |vim.lsp.get_clients()|
- *vim.lsp.for_each_buffer_client()* Use |vim.lsp.get_clients()|
- *vim.lsp.util.trim_empty_lines()* Use |vim.split()| with `trimempty` instead.
- *vim.lsp.util.try_trim_markdown_code_blocks()*
- *vim.lsp.util.set_lines()*
TREESITTER FUNCTIONS
- *vim.treesitter.language.require_language()* Use |vim.treesitter.language.add()|

View File

@@ -1955,20 +1955,6 @@ rename({old_fname}, {new_fname}, {opts}) *vim.lsp.util.rename()*
Parameters: ~
• {opts} (table)
set_lines({lines}, {A}, {B}, {new_lines}) *vim.lsp.util.set_lines()*
Replaces text in a range with new text.
CAUTION: Changes in-place!
Parameters: ~
• {lines} (table) Original list of strings
• {A} (table) Start position; a 2-tuple of {line,col} numbers
• {B} (table) End position; a 2-tuple of {line,col} numbers
• {new_lines} (table) list of strings to replace the original
Return: ~
(table) The modified {lines} object
*vim.lsp.util.show_document()*
show_document({location}, {offset_encoding}, {opts})
Shows document and optionally jumps to the location.
@@ -2033,19 +2019,6 @@ text_document_completion_list_to_complete_items({result}, {prefix})
See also: ~
• complete-items
*vim.lsp.util.try_trim_markdown_code_blocks()*
try_trim_markdown_code_blocks({lines})
Accepts markdown lines and tries to reduce them to a filetype if they
comprise just a single code block.
CAUTION: Modifies the input in-place!
Parameters: ~
• {lines} (table) list of lines
Return: ~
(string) filetype or "markdown" if it was unchanged.
==============================================================================
Lua module: vim.lsp.log *lsp-log*

View File

@@ -281,6 +281,8 @@ release.
- |vim.lsp.get_active_clients()| Use |vim.lsp.get_clients()| instead.
- |vim.lsp.for_each_buffer_client()| Use |vim.lsp.get_clients()| instead.
- |vim.lsp.util.trim_empty_lines()| Use |vim.split()| with `trimempty` instead.
- |vim.lsp.util.try_trim_markdown_code_blocks()|
- |vim.lsp.util.set_lines()|
• `vim.loop` has been renamed to `vim.uv`.