mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
feat(lsp): move inlay_hint() to vim.lsp (#24130)
Allows to keep more functions hidden and gives a path forward for further inlay_hint related functions - like applying textEdits. See https://github.com/neovim/neovim/pull/23984#pullrequestreview-1486624668
This commit is contained in:

committed by
GitHub

parent
d55d7646c1
commit
37079fca58
@@ -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.
|
||||
|
Reference in New Issue
Block a user