Skip to content
Discussion options

You must be logged in to vote

By using parentheses ({count=-1, float=true}) you're calling vim.diagnostic.jump and passing the return value instead of passing the function itself.
Wrapping the function call inside a lambda should fix your problem:

{ '<leader>dk', function() vim.diagnostic.jump({count=-1, float=true}) end, desc = '[d]iagnostic goto_prev [k]' },
{ '<leader>dj', function() vim.diagnostic.jump({count=1, float=true}) end, desc = '[d]iagnostic goto_next [j]' },

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@verygitmuchhub
Comment options

Answer selected by verygitmuchhub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants