Cleaning up WhichKey hints
This commit is contained in:
parent
7d476d886b
commit
4924454d0a
@ -33,16 +33,16 @@ require('gitsigns').setup{
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
-- Actions
|
-- Actions
|
||||||
map('n', '<leader>hs', gitsigns.stage_hunk)
|
map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'stage hunk')
|
||||||
map('n', '<leader>hr', gitsigns.reset_hunk)
|
map('n', '<leader>hr', gitsigns.reset_hunk, 'reset hunk')
|
||||||
map('n', '<leader>hS', gitsigns.stage_buffer)
|
map('n', '<leader>hS', gitsigns.stage_buffer, 'stage buffer')
|
||||||
map('n', '<leader>hu', gitsigns.undo_stage_hunk)
|
map('n', '<leader>hu', gitsigns.undo_stage_hunk, 'undo stage hunk')
|
||||||
map('n', '<leader>hR', gitsigns.reset_buffer)
|
map('n', '<leader>hR', gitsigns.reset_buffer, 'reset buffer')
|
||||||
map('n', '<leader>hp', gitsigns.preview_hunk)
|
map('n', '<leader>hp', gitsigns.preview_hunk, 'preview hunk')
|
||||||
map('n', '<leader>hb', function() gitsigns.blame_line{full=true} end)
|
map('n', '<leader>hb', function() gitsigns.blame_line{full=true} end, 'hunk blame')
|
||||||
map('n', '<leader>tb', gitsigns.toggle_current_line_blame)
|
map('n', '<leader>tb', gitsigns.toggle_current_line_blame, 'toggle single line blame')
|
||||||
map('n', '<leader>hd', gitsigns.diffthis)
|
map('n', '<leader>hd', gitsigns.diffthis, 'hunk diff')
|
||||||
map('n', '<leader>hD', function() gitsigns.diffthis('~') end)
|
map('n', '<leader>hD', function() gitsigns.diffthis('~') end, 'diff deleted')
|
||||||
map('n', '<leader>td', gitsigns.toggle_deleted)
|
map('n', '<leader>td', gitsigns.toggle_deleted, 'toggle deleted')
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
local builtin = require('telescope.builtin')
|
local builtin = require('telescope.builtin')
|
||||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = "Find files" })
|
||||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
|
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = "Find in live grep" })
|
||||||
vim.keymap.set('n', '<leader>fs', builtin.grep_string, {})
|
vim.keymap.set('n', '<leader>fs', builtin.grep_string, { desc = "Find string" })
|
||||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
|
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = "Find from help" })
|
||||||
|
@ -1 +1 @@
|
|||||||
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
vim.keymap.set("n", "<leader>tu", vim.cmd.UndotreeToggle, { desc = 'Toggle undo tree' })
|
||||||
|
8
after/plugin/whichkey.lua
Normal file
8
after/plugin/whichkey.lua
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
-- Document existing key chains
|
||||||
|
require('which-key').register {
|
||||||
|
['<leader>f'] = { name = '[F]ind', _ = 'which_key_ignore' },
|
||||||
|
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
|
||||||
|
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
||||||
|
['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' },
|
||||||
|
['<leader>h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' },
|
||||||
|
}
|
@ -13,7 +13,7 @@ vim.opt.swapfile = false
|
|||||||
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||||
vim.opt.undofile = true
|
vim.opt.undofile = true
|
||||||
|
|
||||||
vim.opt.hlsearch = false
|
vim.opt.hlsearch = true
|
||||||
vim.opt.incsearch = true
|
vim.opt.incsearch = true
|
||||||
|
|
||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
|
Loading…
Reference in New Issue
Block a user