refactor(nvim): change up keybindings
This commit is contained in:
parent
8768b58ce1
commit
d17f034e34
3 changed files with 8 additions and 17 deletions
|
@ -201,8 +201,6 @@ with builtins;
|
|||
{ key = "<leader>sk"; cmd = "<cmd>Telescope keymaps<cr>"; desc = "Keymaps"; }
|
||||
{ key = "<leader>ss"; cmd = "<cmd>Telescope lsp_document_symbols<cr>"; desc = "Symbols (Document)"; }
|
||||
{ key = "<leader>sS"; cmd = "<cmd>Telescope lsp_workspace_symbols<cr>"; desc = "Symbols (Workspace)"; }
|
||||
{ key = "<leader>gc"; cmd = "<cmd>Telescope git_commits<cr>"; desc = "Commits"; }
|
||||
{ key = "<leader>gs"; cmd = "<cmd>Telescope git_status<cr>"; desc = "Status"; }
|
||||
];
|
||||
dependencies = [
|
||||
{ plugin = plenary-nvim; }
|
||||
|
|
|
@ -1,22 +1,15 @@
|
|||
require("gitsigns").setup()
|
||||
require("which-key").register({
|
||||
["["] = {
|
||||
h = { "<cmd>Gitsigns prev_hunk<cr>", "Previous hunk" },
|
||||
},
|
||||
["]"] = {
|
||||
h = { "<cmd>Gitsigns next_hunk<cr>", "Next hunk" },
|
||||
},
|
||||
})
|
||||
require("which-key").register({
|
||||
h = {
|
||||
name = "hunk",
|
||||
["[h"] = { "<cmd>Gitsigns prev_hunk<cr>", "Previous hunk" },
|
||||
["]h"] = { "<cmd>Gitsigns next_hunk<cr>", "Next hunk" },
|
||||
["<leader>g"] = {
|
||||
s = { "<cmd>Gitsigns stage_hunk<cr>", "Stage hunk", mode = { "n", "v" } },
|
||||
r = { "<cmd>Gitsigns reset_hunk<cr>", "Reset hunk", mode = { "n", "v" } },
|
||||
S = { "<cmd>Gitsigns stage_buffer<cr>", "Stage buffer" },
|
||||
R = { "<cmd>Gitsigns reset_buffer<cr>", "Reset buffer" },
|
||||
u = { "<cmd>Gitsigns undo_stage_hunk<cr>", "Undo stage hunk" },
|
||||
p = { "<cmd>Gitsigns preview_hunk_inline<cr>", "Preview hunk (inline)" },
|
||||
P = { "<cmd>Gitsigns preview_hunk<cr>", "Preview hunk (float)" },
|
||||
},
|
||||
}, { prefix = "<leader>g" })
|
||||
require("which-key").register({
|
||||
h = { ":<C-U>Gitsigns select_hunk<cr>", "Gitsigns select hunk" },
|
||||
}, { prefix = "i", mode = { "o", "x" } })
|
||||
["ih"] = { ":<C-U>Gitsigns select_hunk<cr>", "gitsigns hunk", mode = { "o", "x" } },
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require("oil").setup()
|
||||
require("which-key").register({
|
||||
d = { require("oil").toggle_float, "directory (oil)" },
|
||||
d = { require("oil").toggle_float, "Directory (oil)" },
|
||||
}, { prefix = "<leader>t" })
|
||||
|
|
Loading…
Reference in a new issue