iterating overr all default keymaps

This commit is contained in:
Christoph J. Scherr 2024-01-19 23:44:07 +01:00
parent 80a7e22a62
commit 383f7fe4be
Signed by: PlexSheep
GPG Key ID: 7CDD0B14851A08EF
2 changed files with 124 additions and 5 deletions

View File

@ -7,3 +7,5 @@ opt.foldlevel = 4
opt.signcolumn = "yes"
opt.spelllang = "en,de"
opt.clipboard = "" -- dont just use the system clipboard
opt.wrap = false
opt.breakindent = false

View File

@ -3,12 +3,96 @@ local M = {}
M.disabled = {
n = {
["<leader>h"] = "",
["<leader>ff"] = "",
["<C-a>"] = "",
["<C-s>"] = "",
["<C-c>"] = "",
["<leader>n"] = "",
["<leader>rn"] = "",
["<Up>"] = "",
["<Down>"] = "",
["<leader>x"] = "",
["<leader>/"] = "",
["<leader>ra"] = "",
["[d"] = "",
["]d"] = "",
["[c"] = "",
["]c"] = "",
["<leader>h"] = "",
["<leader>ff"] = "",
["<leader>fa"] = "",
["<leader>fw"] = "",
["<leader>fb"] = "",
["<leader>fh"] = "",
["<leader>fo"] = "",
["<leader>fz"] = "",
["<leader>cm"] = "",
["<leader>gt"] = "",
["<leader>pt"] = "",
["<leader>th"] = "",
["<leader>ma"] = "",
["<leader>v"] = "",
["<leader>rh"] = "",
["<leader>ph"] = "",
["<leader>gb"] = "",
["<leader>td"] = "",
},
t = {
["<C-t>"] = "",
},
v = {
["<leader>/"] = "",
},
}
M.tabufline = {
plugin = true,
n = {
-- cycle through buffers
["<tab>"] = {
function()
require("nvchad.tabufline").tabuflineNext()
end,
"Goto next buffer",
},
["<S-tab>"] = {
function()
require("nvchad.tabufline").tabuflinePrev()
end,
"Goto prev buffer",
},
-- close buffer + hide terminal buffer
["<A-x>"] = {
function()
require("nvchad.tabufline").close_buffer()
end,
"Close buffer",
},
},
}
M.comment = {
plugin = true,
-- toggle comment in both modes
n = {
["<leader>v"] = {
function()
require("Comment.api").toggle.linewise.current()
end,
"Toggle comment",
},
},
v = {
["<leader>v"] = {
"<ESC><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<CR>",
"Toggle comment",
},
},
v = {},
}
M.leap = {
@ -64,6 +148,25 @@ M.lazygit = {
},
}
M.lspconfig = {
plugin = true,
n = {
["[d"] = {
function()
vim.diagnostic.goto_prev { float = { border = "rounded" } }
end,
"Goto prev",
},
["<leader>cj"] = {
function()
vim.diagnostic.goto_next { float = { border = "rounded" } }
end,
"Goto next",
},
},
}
M.clipboard = {
plugin = false,
n = {
@ -104,6 +207,18 @@ M.telescope = {
},
}
M.nvterm = {
plugin = true,
t = {
-- preserve defaults
},
n = {
-- preserve defaults
},
}
M.nvimtree = {
plugin = true,
n = {
@ -168,8 +283,10 @@ M.edit = {
-- split and join lines
-- "J" for join is defaul
["S"] = {
"i<CR>k<END>", "split line"},
["S"] = {
"i<CR>k<END><ESC>",
"split line",
},
-- do something useful with the arrows
["<Up>"] = { "<cmd> move-2<CR>", "Move line up", opts = { expr = true } },