aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorChinmay Dalal <dalal.chinmay.0101@gmail.com>2023-06-20 11:36:54 +0530
committerGitHub <noreply@github.com>2023-06-19 23:06:54 -0700
commitca5de9306c00d07cce1daef1f0038c937098bc66 (patch)
treea4531c198f24195e8af966664a80fcb11d05dd21 /runtime/doc
parent72a6643b1380cdf6f1153d70eeaffb90bdca30d6 (diff)
downloadrneovim-ca5de9306c00d07cce1daef1f0038c937098bc66.tar.gz
rneovim-ca5de9306c00d07cce1daef1f0038c937098bc66.tar.bz2
rneovim-ca5de9306c00d07cce1daef1f0038c937098bc66.zip
feat(lsp): inlay hints #23984
Add automatic refresh and a public interface on top of #23736 * add on_reload, on_detach handlers in `enable()` buf_attach, and LspDetach autocommand in case of manual detach * unify `__buffers` and `hint_cache_by_buf` * use callback bufnr in `on_lines` callback, bufstate: remove __index override * move user-facing functions into vim.lsp.buf, unify enable/disable/toggle Closes #18086
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/lsp.txt7
-rw-r--r--runtime/doc/news.txt5
2 files changed, 10 insertions, 2 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index ca4570e392..73691c0656 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -1296,6 +1296,13 @@ incoming_calls() *vim.lsp.buf.incoming_calls()*
window. If the symbol can resolve to multiple items, the user can pick one
in the |inputlist()|.
+inlay_hint({bufnr}, {enable}) *vim.lsp.buf.inlay_hint()*
+ Enable/disable/toggle inlay hints for a buffer
+
+ Parameters: ~
+ • {bufnr} (integer) Buffer handle, or 0 for current
+ • {enable} (boolean|nil) true/false to enable/disable, nil to toggle
+
list_workspace_folders() *vim.lsp.buf.list_workspace_folders()*
List workspace folders.
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index cd3b1bd45e..2a25edc4eb 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -93,8 +93,9 @@ The following new APIs and features were added.
• |nvim_set_keymap()| and |nvim_del_keymap()| now support abbreviations.
-• Added |lsp-handler| for inlay hints: `textDocument/inlayHint` and
- `workspace/inlayHint/refresh`
+• Implemented LSP inlay hints: |vim.lsp.buf.inlay_hint()|
+ https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_inlayHint
+
==============================================================================
CHANGED FEATURES *news-changed*