summaryrefslogtreecommitdiffstats
path: root/nvim
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
commit5791b343b61cc9d2c5979b45db1eadfc0925ff06 (patch)
tree0ca8a76704215855a980a0386bcb4363c0341ee5 /nvim
parentab0420b8dc27bee49f7791a7b8d0500ef970b3d7 (diff)
downloaddots-5791b343b61cc9d2c5979b45db1eadfc0925ff06.tar.gz
init.lua: move diagnostic keymaps together with other keymaps
Diffstat (limited to 'nvim')
-rw-r--r--nvim/init.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/nvim/init.lua b/nvim/init.lua
index 0976a46..225ad21 100644
--- a/nvim/init.lua
+++ b/nvim/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)