nvim-config/lua/mappings.lua

18 lines
1 KiB
Lua

require "nvchad.mappings"
-- add yours here
local map = vim.keymap.set
map("n", ";", ":", { desc = "CMD enter command mode" })
map("i", "jk", "<ESC>")
map("n", "<leader>gr", "<cmd> Gitsigns reset_hunk <CR>", { desc = "Reset hunk"})
map("n", "<leader>gp", "<cmd> Gitsigns preview_hunk <CR>", { desc = "See preview hunk"})
map("n", "<leader>gd", "<cmd> Gitsigns diffthis <CR>", { desc = "See diff"})
map("n", "<leader>gco", "<cmd> GitConflictChooseOurs <CR>", { desc = "Git conflict ours"})
map("n", "<leader>gct", "<cmd> GitConflictChooseTheirs <CR>", { desc = "Git conflict theirs"})
map("n", "<leader>gcb", "<cmd> GitConflictChooseBoth <CR>", { desc = "Git conflict both"})
map("n", "<leader>gc0", "<cmd> GitConflictChooseNone <CR>", { desc = "Git conflict none"})
map("n", "<leader>gcp", "<cmd> GitConflictPrevConflict <CR>", { desc = "Git conflict preview conflict"})
map("n", "<leader>gcn", "<cmd> GitConflictNextConflict <CR>", { desc = "Git conflict next conflict"})
map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")