nvim: keymappings: [D and ]D are now mapped by default

These are now mapped for jumping to first and last diagnostic in the
buffer.
This commit is contained in:
Sanchayan Maity 2024-06-03 12:04:22 +05:30
parent 2ffd6a3803
commit 19281ca606
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3

View file

@ -156,9 +156,7 @@ remap('n', '<Leader>mc', ':norm `.<CR>' , opts)
remap('n', '<Leader>mi', ':norm `^<CR>' , opts) remap('n', '<Leader>mi', ':norm `^<CR>' , opts)
remap('n', '<Leader>mj', ':norm `\'<CR>', opts) remap('n', '<Leader>mj', ':norm `\'<CR>', opts)
-- [d and ]d are mapped by default -- [d, ]d, [D, ]D are mapped by default
remap('n', '[D', '<cmd>lua vim.diagnostic.goto_prev()<CR>' , opts)
remap('n', ']D', '<cmd>lua vim.diagnostic.goto_next()<CR>' , opts)
remap('n', 'dl', '<cmd>lua vim.diagnostic.setloclist()<CR>' , opts) remap('n', 'dl', '<cmd>lua vim.diagnostic.setloclist()<CR>' , opts)
remap('n', 'dq', '<cmd>lua vim.diagnostic.setqflist()<CR>' , opts) remap('n', 'dq', '<cmd>lua vim.diagnostic.setqflist()<CR>' , opts)
remap('n', 'dr', '<cmd>lua vim.diagnostic.reset()<CR>' , opts) remap('n', 'dr', '<cmd>lua vim.diagnostic.reset()<CR>' , opts)