iterating overr all default keymaps
This commit is contained in:
parent
80a7e22a62
commit
0a5435d48e
1 changed files with 158 additions and 5 deletions
|
@ -3,12 +3,92 @@ 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"] = "",
|
||||
["<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"] = "",
|
||||
["<A-i>"] = "",
|
||||
["<leader>v"] = "",
|
||||
},
|
||||
t = {
|
||||
["<C-t>"] = "",
|
||||
["<A-i>"] = "",
|
||||
},
|
||||
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 +144,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 +203,58 @@ M.telescope = {
|
|||
},
|
||||
}
|
||||
|
||||
M.nvterm = {
|
||||
plugin = true,
|
||||
|
||||
t = {
|
||||
-- toggle in terminal mode
|
||||
["<A-t>"] = {
|
||||
function()
|
||||
require("nvterm.terminal").toggle "float"
|
||||
end,
|
||||
"Toggle floating term",
|
||||
},
|
||||
|
||||
["<A-h>"] = {
|
||||
function()
|
||||
require("nvterm.terminal").toggle "horizontal"
|
||||
end,
|
||||
"Toggle horizontal term",
|
||||
},
|
||||
|
||||
["<A-v>"] = {
|
||||
function()
|
||||
require("nvterm.terminal").toggle "vertical"
|
||||
end,
|
||||
"Toggle vertical term",
|
||||
},
|
||||
},
|
||||
|
||||
n = {
|
||||
-- toggle in normal mode
|
||||
["<A-t>"] = {
|
||||
function()
|
||||
require("nvterm.terminal").toggle "float"
|
||||
end,
|
||||
"Toggle floating term",
|
||||
},
|
||||
|
||||
["<A-h>"] = {
|
||||
function()
|
||||
require("nvterm.terminal").toggle "horizontal"
|
||||
end,
|
||||
"Toggle horizontal term",
|
||||
},
|
||||
|
||||
["<A-v>"] = {
|
||||
function()
|
||||
require("nvterm.terminal").toggle "vertical"
|
||||
end,
|
||||
"Toggle vertical term",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
M.nvimtree = {
|
||||
plugin = true,
|
||||
n = {
|
||||
|
@ -168,8 +319,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 } },
|
||||
|
|
Loading…
Add table
Reference in a new issue