nvim: Remap leader groups
This commit is a change to some of the foundational mappings I use through my leader key: opening telescope searches and toggling several additional display riders. First of all, all telescope functionality has been subsumed under the <leader>f prefix: f (<leader>ff, that is) for finding files F for grepping h for finding hidden files o for finding old files b for finding buffers l for searching git log s for searching git status c for finding git commits (for current file) Aside from these (which are pretty massive changes for me), we have a new leader prefix group for the (now freed) <leader>s: o toggle symbols outline m toggle minimap s open the (mini.nvim) startup screen
This commit is contained in:
parent
e87814ebcb
commit
9a874b1a1b
1 changed files with 11 additions and 10 deletions
|
@ -116,33 +116,33 @@ map('n', '<leader>E', ':Vifm getcwd()<cr>', { desc = 'browse project' })
|
||||||
|
|
||||||
-- PLUGIN: Telescope GLOBAL FUZZY FINDING
|
-- PLUGIN: Telescope GLOBAL FUZZY FINDING
|
||||||
-- buffers and files in current workdir
|
-- buffers and files in current workdir
|
||||||
map('n', '<leader>s',
|
map('n', '<leader>fb',
|
||||||
":lua require 'telescope.builtin'.buffers(require 'telescope.themes'.get_ivy())<cr>",
|
":lua require 'telescope.builtin'.buffers(require 'telescope.themes'.get_ivy())<cr>",
|
||||||
{ desc = 'list buffers' })
|
{ desc = 'list buffers' })
|
||||||
-- most recently used / MRU, bound to S since it is essentially a larger
|
-- most recently used / MRU, bound to S since it is essentially a larger
|
||||||
-- go-back intention than just buffers
|
-- go-back intention than just buffers
|
||||||
map('n', '<leader>S',
|
map('n', '<leader>fo',
|
||||||
":lua require 'telescope.builtin'.oldfiles(require 'telescope.themes'.get_ivy())<cr>",
|
":lua require 'telescope.builtin'.oldfiles(require 'telescope.themes'.get_ivy())<cr>",
|
||||||
{ desc = 'list old files' })
|
{ desc = 'list old files' })
|
||||||
-- fuzzy find files in cwd
|
-- fuzzy find files in cwd
|
||||||
map('n', '<leader>f', ":lua require 'telescope.builtin'.find_files()<cr>",
|
map('n', '<leader>ff', ":lua require 'telescope.builtin'.find_files()<cr>",
|
||||||
{ desc = 'find files' })
|
{ desc = 'find files' })
|
||||||
-- fuzzy find hidden files in cwd
|
-- fuzzy find hidden files in cwd
|
||||||
map('n', '<leader><c-f>',
|
map('n', '<leader>fh',
|
||||||
":lua require 'telescope.builtin'.find_files({hidden=true})<cr>",
|
":lua require 'telescope.builtin'.find_files({hidden=true})<cr>",
|
||||||
{ desc = 'find hidden files' })
|
{ desc = 'find hidden files' })
|
||||||
-- general full-text search in cwd with rg
|
-- general full-text search in cwd with rg
|
||||||
map('n', '<leader>F', ":lua require 'telescope.builtin'.live_grep()<cr>",
|
map('n', '<leader>fF', ":lua require 'telescope.builtin'.live_grep()<cr>",
|
||||||
{ desc = 'grep search' })
|
{ desc = 'grep search' })
|
||||||
|
|
||||||
-- git status
|
-- git status
|
||||||
map('n', '<leader>gs', ":lua require 'telescope.builtin'.git_status()<cr>",
|
map('n', '<leader>fg', ":lua require 'telescope.builtin'.git_status()<cr>",
|
||||||
{ desc = 'git status' })
|
{ desc = 'git status' })
|
||||||
-- git buffercommits
|
-- git buffercommits
|
||||||
map('n', '<leader>gb', ":lua require 'telescope.builtin'.git_bcommits()<cr>",
|
map('n', '<leader>fc', ":lua require 'telescope.builtin'.git_bcommits()<cr>",
|
||||||
{ desc = 'git buffer commits' })
|
{ desc = 'git buffer commits' })
|
||||||
-- git commitlog
|
-- git commitlog
|
||||||
map('n', '<leader>gl', ":lua require 'telescope.builtin'.git_commits()<cr>",
|
map('n', '<leader>fl', ":lua require 'telescope.builtin'.git_commits()<cr>",
|
||||||
{ desc = 'git commit log' })
|
{ desc = 'git commit log' })
|
||||||
|
|
||||||
-- helptags
|
-- helptags
|
||||||
|
@ -193,7 +193,8 @@ map('i', '<c-s>', '<C-G>u<Esc>[s1z=`]a<C-G>u')
|
||||||
map('n', '<localleader>s', 'ms[s1z=`s', { desc = 'Fix last spell error' })
|
map('n', '<localleader>s', 'ms[s1z=`s', { desc = 'Fix last spell error' })
|
||||||
|
|
||||||
-- PLUGIN: mini.nvim
|
-- PLUGIN: mini.nvim
|
||||||
map('n', '<leader>m', ':lua MiniMap.toggle()<cr>', { silent = true })
|
map('n', '<leader>sm', ':lua MiniMap.toggle()<cr>', { silent = true, desc = 'toggle minimap' })
|
||||||
|
map('n', '<leader>ss', ":lua MiniStarter.open()<cr>", { desc = 'show startpage' })
|
||||||
|
|
||||||
-- PLUGIN: easy-align
|
-- PLUGIN: easy-align
|
||||||
-- Start interactive EasyAlign in visual mode (e.g. vipga)
|
-- Start interactive EasyAlign in visual mode (e.g. vipga)
|
||||||
|
@ -202,7 +203,7 @@ map('x', 'ga', '<Plug>(EasyAlign)')
|
||||||
map('n', 'ga', '<Plug>(EasyAlign)')
|
map('n', 'ga', '<Plug>(EasyAlign)')
|
||||||
|
|
||||||
-- PLUGIN: symbols-outline.nvim
|
-- PLUGIN: symbols-outline.nvim
|
||||||
map('n', '<leader>o', '<cmd>SymbolsOutline<cr>', { silent = true })
|
map('n', '<leader>so', '<cmd>SymbolsOutline<cr>', { silent = true, desc = 'toggle symbol outline' })
|
||||||
|
|
||||||
-- trim trailing whitespaces with mini.nvim trailspace
|
-- trim trailing whitespaces with mini.nvim trailspace
|
||||||
map("n", "<localleader>w", function() require("mini.trailspace").trim() end,
|
map("n", "<localleader>w", function() require("mini.trailspace").trim() end,
|
||||||
|
|
Loading…
Reference in a new issue