Configuration files for my GNU/Linux installation.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
dotfiles/nvchad/.config/nvim/lua/custom/mappings.lua

38 lines
712 B

---@type MappingsTable
local M = {}
M.general = {
n = {
[";"] = { ":", "enter command mode", opts = { nowait = true } },
-- format with conform
["<leader>fm"] = {
function()
require("conform").format()
end,
"formatting",
},
},
v = {
-- Indentation
[">"] = { ">gv", "indent" },
-- Move selection up/down with K/J
["J"] = { ":m '>+1<CR>gv=gv", "move selection down" },
["K"] = { ":m '<-2<CR>gv=gv", "move selection up" },
},
i = {
["<C-l>"] = {
function()
vim.fn.feedkeys(vim.fn["copilot#Accept"](), "")
end,
"Copilot Accept",
{ replace_keycodes = true, nowait = true, silent = true, expr = true, noremap = true },
},
},
}
-- more keybinds!
return M