nvim: lsp: Inlay hints API has changed
With the recent change to the API, without passing buffer number as 0 for the current buffer, inlay hints gets enabled for all buffers.
This commit is contained in:
parent
65e5721a5a
commit
420d643338
1 changed files with 4 additions and 1 deletions
|
@ -16,7 +16,10 @@ local peek_definition = function()
|
||||||
end
|
end
|
||||||
|
|
||||||
local inlay_hint_toggle = function()
|
local inlay_hint_toggle = function()
|
||||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
|
local filter = { bufnr = 0 }
|
||||||
|
local enabled = vim.lsp.inlay_hint.is_enabled(filter)
|
||||||
|
|
||||||
|
vim.lsp.inlay_hint.enable(not enabled, filter)
|
||||||
end
|
end
|
||||||
|
|
||||||
_G.InlayHintToggle = inlay_hint_toggle
|
_G.InlayHintToggle = inlay_hint_toggle
|
||||||
|
|
Loading…
Reference in a new issue