if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then
-- Toggle inlay hints
map('th', function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
end, '[T]oggle Inlay [H]ints')
end
adding {} to inlay_hint.is_enabled() solves the problem inlay_hint.is_enabled({})
Describe the bug
LuaLS gives a warning on is_enabled
To Reproduce
if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then -- Toggle inlay hints map('th', function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
end, '[T]oggle Inlay [H]ints')
end
adding {} to inlay_hint.is_enabled() solves the problem inlay_hint.is_enabled({})
Desktop
Neovim Version
NVIM v0.10.0 Build type: Release LuaJIT 2.1.1716656478