mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
fix(lsp): fix attempt to call non existent function (#24212)
Commit 37079fc
moved inlay_hint to vim.lsp() but in the process did
missed converting a call to disable/enable which are now local.
Fixes the below error when trying to toggle inlay hints.
E5108: Error executing lua /usr/local/share/nvim/runtime/lua/vim/lsp/inlay_hint.lua:248: attempt to call field 'disable' (a nil value)
stack traceback:
/usr/local/share/nvim/runtime/lua/vim/lsp/inlay_hint.lua:248: in function 'toggle'
/usr/local/share/nvim/runtime/lua/vim/lsp/inlay_hint.lua:310: in function 'inlay_hint'
[string ":lua"]:1: in main chunk
This commit is contained in:
parent
751b9d73fd
commit
d191bdf9d5
@ -245,9 +245,9 @@ local function toggle(bufnr)
|
||||
bufnr = resolve_bufnr(bufnr)
|
||||
local bufstate = bufstates[bufnr]
|
||||
if bufstate and bufstate.enabled then
|
||||
M.disable(bufnr)
|
||||
disable(bufnr)
|
||||
else
|
||||
M.enable(bufnr)
|
||||
enable(bufnr)
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user