Finally modularize neovim configuration
This commit is contained in:
parent
d4ca4668c4
commit
e2697f61fd
16 changed files with 872 additions and 1004 deletions
19
lua/config/keymaps.lua
Normal file
19
lua/config/keymaps.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
-- Keymaps configuration
|
||||
|
||||
-- Clear search highlight
|
||||
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
|
||||
|
||||
-- Diagnostic keymaps
|
||||
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, { desc = "Go to previous [D]iagnostic message" })
|
||||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "Go to next [D]iagnostic message" })
|
||||
vim.keymap.set("n", "<leader>e", vim.diagnostic.open_float, { desc = "Show diagnostic [E]rror messages" })
|
||||
vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" })
|
||||
|
||||
-- Window navigation
|
||||
vim.keymap.set("n", "<C-h>", "<C-w><C-h>", { desc = "Move focus to the left window" })
|
||||
vim.keymap.set("n", "<C-l>", "<C-w><C-l>", { desc = "Move focus to the right window" })
|
||||
vim.keymap.set("n", "<C-j>", "<C-w><C-j>", { desc = "Move focus to the lower window" })
|
||||
vim.keymap.set("n", "<C-k>", "<C-w><C-k>", { desc = "Move focus to the upper window" })
|
||||
|
||||
-- LSP keymaps
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, { desc = "Goto Definition" })
|
Loading…
Add table
Add a link
Reference in a new issue