aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorMathias Fußenegger <mfussenegger@users.noreply.github.com>2022-12-31 16:16:21 +0100
committerGitHub <noreply@github.com>2022-12-31 16:16:21 +0100
commit6ba34e21fee2a81677e8261dfeaf24c8cd320500 (patch)
treec972f70f75dd53c28e97c857c4085b596e1b92af /runtime/doc
parentcce736218f465511194465410e1ba23b5530e46f (diff)
downloadrneovim-6ba34e21fee2a81677e8261dfeaf24c8cd320500.tar.gz
rneovim-6ba34e21fee2a81677e8261dfeaf24c8cd320500.tar.bz2
rneovim-6ba34e21fee2a81677e8261dfeaf24c8cd320500.zip
feat(lsp): add function to clear codelens (#21504)
Currently once you retrieve the lenses you're pretty much stuck with them as saving new lenses is additive. Adding a dedicated method to reset lenses allows users to toggle lenses on/off which can be useful for language servers where they are noisy or expensive and you only want to see them temporary.
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/lsp.txt7
-rw-r--r--runtime/doc/news.txt2
2 files changed, 9 insertions, 0 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index b101740b03..705d7675e5 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -1278,6 +1278,13 @@ on_publish_diagnostics({_}, {result}, {ctx}, {config})
==============================================================================
Lua module: vim.lsp.codelens *lsp-codelens*
+clear({client_id}, {bufnr}) *vim.lsp.codelens.clear()*
+ Clear the lenses
+
+ Parameters: ~
+ • {client_id} (number|nil) filter by client_id. All clients if nil
+ • {bufnr} (number|nil) filter by buffer. All buffers if nil
+
display({lenses}, {bufnr}, {client_id}) *vim.lsp.codelens.display()*
Display the lenses using virtual text
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 25e753aaed..1a242e9128 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -39,6 +39,8 @@ NEW FEATURES *news-features*
The following new APIs or features were added.
+• Added a |vim.lsp.codelens.clear()| function to clear codelenses.
+
• |vim.inspect_pos()|, |vim.show_pos()| and |:Inspect| allow a user to get or show items
at a given buffer postion. Currently this includes treesitter captures,
semantic tokens, syntax groups and extmarks.