do not open floating window with [d and ]d

This commit is contained in:
Ray Elliott 2026-01-18 19:23:17 +00:00
parent 2a516e353b
commit 3b8be3598c
3 changed files with 10 additions and 3 deletions

View File

@ -49,9 +49,15 @@ end, { desc = 'Diagnostics: Buffer errors (location list)', silent = true })
map('n', '<leader>xE', function()
vim.diagnostic.setqflist({ severity = vim.diagnostic.severity.ERROR })
end, { desc = 'Diagnostics: All errors (quickfix)', silent = true })
map('n', '[d', vim.diagnostic.goto_prev, { desc = 'Diagnostics: Previous diagnostic', silent = true })
map('n', ']d', vim.diagnostic.goto_next, { desc = 'Diagnostics: Next diagnostic', silent = true })
map('n', '<leader>xd', vim.diagnostic.open_float, { desc = 'Diagnostics: Show diagnostic under cursor', silent = true })
map('n', '[d', function()
vim.diagnostic.goto_prev({ float = false })
end, { desc = 'Diagnostics: Previous diagnostic', silent = true })
map('n', ']d', function()
vim.diagnostic.goto_next({ float = false })
end, { desc = 'Diagnostics: Next diagnostic', silent = true })
map('n', '<leader>xd', function()
pcall(vim.diagnostic.open_float)
end, { desc = 'Diagnostics: Show diagnostic under cursor', silent = true })
map('n', '<leader>xt', function()
vim.diagnostic.enable(not vim.diagnostic.is_enabled())
end, { desc = 'Diagnostics: Toggle display', silent = true })

View File

@ -774,3 +774,4 @@ Trengo
Hostinger's
hPanel
reauthoring
dropdowns

Binary file not shown.