aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/lua/vim/lsp.lua')
-rw-r--r--runtime/lua/vim/lsp.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua
index 2c115007de..ca4851f8d7 100644
--- a/runtime/lua/vim/lsp.lua
+++ b/runtime/lua/vim/lsp.lua
@@ -2457,7 +2457,7 @@ end
--- buffer number as arguments. Example:
--- <pre>lua
--- vim.lsp.for_each_buffer_client(0, function(client, client_id, bufnr)
---- print(vim.inspect(client))
+--- vim.print(client)
--- end)
--- </pre>
---@deprecated use lsp.get_active_clients({ bufnr = bufnr }) with regular loop
@@ -2474,6 +2474,13 @@ function lsp.with(handler, override_config)
end
end
+--- Enable/disable/toggle inlay hints for a buffer
+---@param bufnr (integer) Buffer handle, or 0 for current
+---@param enable (boolean|nil) true/false to enable/disable, nil to toggle
+function lsp.inlay_hint(bufnr, enable)
+ return require('vim.lsp.inlay_hint')(bufnr, enable)
+end
+
--- Helper function to use when implementing a handler.
--- This will check that all of the keys in the user configuration
--- are valid keys and make sense to include for this handler.