aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/inlay_hint.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2024-01-18 00:14:48 -0800
committerGitHub <noreply@github.com>2024-01-18 00:14:48 -0800
commit95cbedaa1798a7c1489b68dd60380a41443ed34b (patch)
tree92dfec6359159c229aa045fe883fdd10e8ed2bb3 /runtime/lua/vim/lsp/inlay_hint.lua
parent11e8e14628413e45e46d2d2a7af53d0da0c9dcdd (diff)
downloadrneovim-95cbedaa1798a7c1489b68dd60380a41443ed34b.tar.gz
rneovim-95cbedaa1798a7c1489b68dd60380a41443ed34b.tar.bz2
rneovim-95cbedaa1798a7c1489b68dd60380a41443ed34b.zip
docs: various #25289
Co-authored-by: Jongwook Choi <wookayin@gmail.com> Co-authored-by: Oliver Marriott <hello@omarriott.com> Co-authored-by: Benoit de Chezelles <bew@users.noreply.github.com> Co-authored-by: Jongwook Choi <wookayin@gmail.com>
Diffstat (limited to 'runtime/lua/vim/lsp/inlay_hint.lua')
-rw-r--r--runtime/lua/vim/lsp/inlay_hint.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/inlay_hint.lua b/runtime/lua/vim/lsp/inlay_hint.lua
index ce1680549e..4816b873ba 100644
--- a/runtime/lua/vim/lsp/inlay_hint.lua
+++ b/runtime/lua/vim/lsp/inlay_hint.lua
@@ -368,7 +368,13 @@ function M.is_enabled(bufnr)
return bufstates[bufnr] and bufstates[bufnr].enabled or false
end
---- Enable/disable/toggle inlay hints for a buffer
+--- Enables or disables inlay hints for a buffer.
+---
+--- To "toggle", pass the inverse of `is_enabled()`:
+---
+--- ```lua
+--- vim.lsp.inlay_hint.enable(0, not vim.lsp.inlay_hint.is_enabled())
+--- ```
---
--- @param bufnr (integer|nil) Buffer handle, or 0 or nil for current
--- @param enable (boolean|nil) true/nil to enable, false to disable