{ globals = { mapleader = " "; }; keymaps = [ { # Unmap space (leader) action = ""; key = ""; options = { noremap = true; silent = true; }; mode = "n"; } { action = "spj"; key = "-"; options.silent = true; options.desc = "Split window horizontally"; } { action = "vspl"; key = "\\"; options.silent = true; options.desc = "Split window vertically"; } { action = "ZenMode"; key = "wz"; options = { silent = true; noremap = true; desc = "Zen mode"; }; } { action = "h"; key = ""; options = { silent = true; noremap = true; desc = "Move to left window"; }; } { action = "j"; key = ""; options = { silent = true; noremap = true; desc = "Move to lower window"; }; } { action = "k"; key = ""; options = { silent = true; noremap = true; desc = "Move to upper window"; }; } { action = "l"; key = ""; options = { silent = true; noremap = true; desc = "Move to right window"; }; } { action = "close"; key = "wd"; options = { silent = true; noremap = true; desc = "Close current window"; }; } { action = "Bdelete!close"; key = "wk"; options = { silent = true; noremap = true; desc = "Close current window, along with the buffer open inside."; }; } { action = "Telescope find_files"; key = "ff"; options = { silent = true; noremap = true; desc = "Find files"; }; } { action = "Telescope live_grep"; key = "/"; options = { silent = true; noremap = true; desc = "Live grep"; }; } { action = "Telescope buffers"; key = "fb"; options = { silent = true; noremap = true; desc = "List buffers"; }; } { action = "Telescope help_tags"; key = "fh"; options = { silent = true; noremap = true; desc = "Help tags"; }; } { action = "lua require'telescope.builtin'.lsp_definitions{}"; key = "gd"; options = { silent = true; noremap = true; desc = "Go to definition"; }; } { action = "lua require'telescope.builtin'.git_files{}"; key = " "; options = { silent = true; noremap = true; desc = "List Git files"; }; } { action = "lua require'telescope.builtin'.find_files{}"; key = "ff"; options = { silent = true; noremap = true; desc = "List all files"; }; } { action = ""; key = ""; options = { silent = true; noremap = true; desc = "Go to normal mode in built-in terminal."; }; mode = "t"; } { action = ":resize +4"; key = "w="; options = { silent = true; noremap = true; desc = "Increase window height."; }; } { action = ":resize -4"; key = "w-"; options = { silent = true; noremap = true; desc = "Decrease window height."; }; } { action = ":vertical resize +4"; key = "w]"; options = { silent = true; noremap = true; desc = "Increase window width."; }; } { action = ":vertical resize -4"; key = "w["; options = { silent = true; noremap = true; desc = "Decrease window width."; }; } { action = ":Bdelete!"; key = "bd"; options = { silent = true; noremap = true; desc = "Close buffer"; }; } { action = ":bprev"; key = "H"; options = { silent = true; noremap = true; desc = "Move to the previous buffer."; }; } { action = ":bnext"; key = "L"; options = { silent = true; noremap = true; desc = "Move to the next buffer."; }; } { action = ":Neogit"; key = "gg"; options = { silent = true; noremap = true; desc = "Open Neogit"; }; } { action = ":split | wincmd j | resize 15 | term"; key = "tt"; options = { silent = true; noremap = true; desc = "Open a half-size horizontal terminal split"; }; mode = "n"; } { action = ":split | wincmd j | term"; key = "te"; options = { silent = true; noremap = true; desc = "Open a horizontal terminal split"; }; mode = "n"; } { action = ":vsplit | wincmd l | term"; key = "tv"; options = { silent = true; noremap = true; desc = "Open a vertical terminal split"; }; mode = "n"; } { action = ":Trouble diagnostics"; key = "xx"; options = { silent = true; noremap = true; desc = "View trouble diagnostics"; }; mode = "n"; } { action = ":Trouble symbols"; key = "xs"; options = { silent = true; noremap = true; desc = "View symbols"; }; mode = "n"; } { action = "(YankyPutAfter)"; key = "p"; mode = [ "n" "x" ]; } { action = "(YankyPutBefore)"; key = "P"; mode = [ "n" "x" ]; } { action = "(YankyGPutAfter)"; key = "gp"; mode = [ "n" "x" ]; } { action = "(YankyGPutBefore)"; key = "gP"; mode = [ "n" "x" ]; } { action = ":Telescope yank_history"; key = "p"; mode = "n"; options.desc = "Look through yank history with telescope."; } { action = '':Oil''; key = "e"; options = { desc = "Open oil file explorer in current nvim working directory"; noremap = true; silent = true; }; } { action = '':Oil''; key = "e"; options = { desc = "Open oil file explorer in current nvim working directory"; noremap = true; silent = true; }; } { action = '':lua vim.lsp.buf.code_action()''; key = "ca"; options = { desc = "View available code actions"; noremap = true; silent = true; }; } { action = '':lua vim.lsp.buf.rename()''; key = "cr"; options = { desc = "Rename symbol"; noremap = true; silent = true; }; } { action = '':lua require("lsp_lines").toggle()''; key = "cd"; options = { desc = "Toggle lsp lines"; noremap = true; silent = true; }; } { action = '':lua vim.lsp.codelens.run()''; key = "cl"; options = { desc = "Run codelens"; noremap = true; silent = true; }; } { action = '':Telescope ht hoogle_signature''; key = "fg"; options = { desc = "Search hoogle for under cursor"; noremap = true; silent = true; }; } # { # action = "lua require'conform'.format({ bufnr = args.bf })"; # key = "cf"; # options = { # silent = true; # noremap = true; # desc = "Format buffer"; # }; # } ]; }