aboutsummaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorDamjan 9000 <damjan.9000@gmail.com>2023-11-07 11:18:15 +0100
committerDamjan 9000 <damjan.9000@gmail.com>2023-11-07 11:18:15 +0100
commitf23484cf88197ac38574f4fd4965cc2c17263f20 (patch)
treeb3645e928d5129f32440b39c6008dc257439529f /init.lua
parent47974f7db1e862fa0fe7891a6c34ba1427ab5218 (diff)
init.lua: move diagnostic keymaps together with other keymaps
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/init.lua b/init.lua
index 0976a46..225ad21 100644
--- a/init.lua
+++ b/init.lua
@@ -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)