diff options
author | Damjan 9000 <damjan.9000@gmail.com> | 2023-11-07 11:18:15 +0100 |
---|---|---|
committer | Damjan 9000 <damjan.9000@gmail.com> | 2023-11-07 11:18:15 +0100 |
commit | f23484cf88197ac38574f4fd4965cc2c17263f20 (patch) | |
tree | b3645e928d5129f32440b39c6008dc257439529f /init.lua | |
parent | 47974f7db1e862fa0fe7891a6c34ba1427ab5218 (diff) |
init.lua: move diagnostic keymaps together with other keymaps
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -281,6 +281,12 @@ vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true }) vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) +-- Diagnostic keymaps +vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' }) +vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' }) +vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' }) +vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' }) + -- [[ Highlight on yank ]] -- See `:help vim.highlight.on_yank()` local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true }) @@ -433,12 +439,6 @@ vim.defer_fn(function() } end, 0) --- Diagnostic keymaps -vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' }) -vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' }) -vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' }) -vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' }) - -- [[ Configure LSP ]] -- This function gets run when an LSP connects to a particular buffer. local on_attach = function(_, bufnr) |