Skip to content

Commit

Permalink
fix inlay hints toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
mosheavni committed May 5, 2024
1 parent b4a8379 commit 905bd8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .config/nvim/lua/user/lsp/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ M.actions = function()
vim.diagnostic.setqflist()
end,
['Toggle inlay hints (<leader>lh)'] = function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled(), { bufnr = 0 })
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = 0 }, { bufnr = 0 })
end,
['Clear Diagnostics'] = function()
vim.diagnostic.reset()
Expand Down
2 changes: 1 addition & 1 deletion .config/nvim/lua/user/lsp/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ return function(bufnr)

-- Inlay hints
nnoremap('<leader>lh', function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled(bufnr))
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = bufnr })
end, returnOpts 'Toggle inlay hints')

-- Diagnostics
Expand Down

0 comments on commit 905bd8d

Please sign in to comment.