fix(defaults): diagnostic mappings descriptions #28646

This commit is contained in:
Evgeni Chasnovski 2024-05-05 17:45:47 +03:00 committed by GitHub
parent efb44e0cad
commit 5e98439f6d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -183,26 +183,22 @@ do
do
vim.keymap.set('n', ']d', function()
vim.diagnostic.goto_next({ float = false })
end, {
desc = 'Jump to the next diagnostic with the highest severity',
})
end, { desc = 'Jump to the next diagnostic' })
vim.keymap.set('n', '[d', function()
vim.diagnostic.goto_prev({ float = false })
end, {
desc = 'Jump to the previous diagnostic with the highest severity',
})
end, { desc = 'Jump to the previous diagnostic' })
vim.keymap.set('n', '<C-W>d', function()
vim.diagnostic.open_float()
end, {
desc = 'Open a floating window showing diagnostics under the cursor',
})
end, { desc = 'Show diagnostics under the cursor' })
vim.keymap.set('n', '<C-W><C-D>', '<C-W>d', {
remap = true,
desc = 'Open a floating window showing diagnostics under the cursor',
})
vim.keymap.set(
'n',
'<C-W><C-D>',
'<C-W>d',
{ remap = true, desc = 'Show diagnostics under the cursor' }
)
end
end