Update mini.clue use

This commit is contained in:
MDS
2026-01-03 17:43:27 +01:00
parent 96596c2908
commit 21efc85d1d
2 changed files with 27 additions and 35 deletions

View File

@@ -47,12 +47,16 @@ _G.Config.leader_group_clues = {
{ mode = 'n', keys = '<Leader>o', desc = '+Other' }, { mode = 'n', keys = '<Leader>o', desc = '+Other' },
{ mode = 'n', keys = '<Leader>s', desc = '+Session' }, { mode = 'n', keys = '<Leader>s', desc = '+Session' },
{ mode = 'n', keys = '<Leader>t', desc = '+Terminal' }, { mode = 'n', keys = '<Leader>t', desc = '+Terminal' },
{ mode = 'n', keys = '<Leader>v', desc = '+Visits' },
{ mode = 'x', keys = '<Leader>g', desc = '+Git' }, { mode = 'x', keys = '<Leader>g', desc = '+Git' },
{ mode = 'x', keys = '<Leader>l', desc = '+Language' }, { mode = 'x', keys = '<Leader>l', desc = '+Language' },
} }
-- Window menu
-- See: https://github.com/nvim-mini/mini.nvim/discussions/2028#discussioncomment-14593098
vim.keymap.set('n', '<leader>w', function()
vim.api.nvim_input '<C-w>'
end, { desc = '+Window' })
-- Helpers for a more concise `<Leader>` mappings. -- Helpers for a more concise `<Leader>` mappings.
-- Most of the mappings use `<Cmd>...<CR>` string as a right hand side (RHS) in -- Most of the mappings use `<Cmd>...<CR>` string as a right hand side (RHS) in
-- an attempt to be more concise yet descriptive. See `:h <Cmd>`. -- an attempt to be more concise yet descriptive. See `:h <Cmd>`.
@@ -161,15 +165,6 @@ nmap_leader('lt', '<Cmd>lua vim.lsp.buf.type_definition()<CR>', 'Type definition
xmap_leader('lf', formatting_cmd, 'Format selection') xmap_leader('lf', formatting_cmd, 'Format selection')
-- m is for 'Map'. Common usage:
-- - `<Leader>mt` - toggle map from 'mini.map' (closed by default)
-- - `<Leader>mf` - focus on the map for fast navigation
-- - `<Leader>ms` - change map's side (if it covers something underneath)
nmap_leader('mf', '<Cmd>lua MiniMap.toggle_focus()<CR>', 'Focus (toggle)')
nmap_leader('mr', '<Cmd>lua MiniMap.refresh()<CR>', 'Refresh')
nmap_leader('ms', '<Cmd>lua MiniMap.toggle_side()<CR>', 'Side (toggle)')
nmap_leader('mt', '<Cmd>lua MiniMap.toggle()<CR>', 'Toggle')
-- o is for 'Other'. Common usage: -- o is for 'Other'. Common usage:
-- - `<Leader>oz` - toggle between "zoomed" and regular view of current buffer -- - `<Leader>oz` - toggle between "zoomed" and regular view of current buffer
nmap_leader('or', '<Cmd>lua MiniMisc.resize_window()<CR>', 'Resize to default width') nmap_leader('or', '<Cmd>lua MiniMisc.resize_window()<CR>', 'Resize to default width')

View File

@@ -104,7 +104,11 @@ now(function() require('mini.sessions').setup() end)
-- See also: -- See also:
-- - `:h MiniStarter-example-config` - non-default config examples -- - `:h MiniStarter-example-config` - non-default config examples
-- - `:h MiniStarter-lifecycle` - how to work with Starter buffer -- - `:h MiniStarter-lifecycle` - how to work with Starter buffer
now(function() require('mini.starter').setup() end) now(
function()
require('mini.starter').setup({ header = "Remember why you're doing it" })
end
)
-- Statusline. Sets `:h 'statusline'` to show more info in a line below window. -- Statusline. Sets `:h 'statusline'` to show more info in a line below window.
-- See also: -- See also:
@@ -203,6 +207,7 @@ later(function()
miniclue.gen_clues.g(), miniclue.gen_clues.g(),
miniclue.gen_clues.marks(), miniclue.gen_clues.marks(),
miniclue.gen_clues.registers(), miniclue.gen_clues.registers(),
miniclue.gen_clues.square_brackets(),
-- This creates a submode for window resize mappings. Try the following: -- This creates a submode for window resize mappings. Try the following:
-- - Press `<C-w>s` to make a window split. -- - Press `<C-w>s` to make a window split.
-- - Press `<C-w>+` to increase height. Clue window still shows clues as if -- - Press `<C-w>+` to increase height. Clue window still shows clues as if
@@ -214,33 +219,25 @@ later(function()
}, },
-- Explicitly opt-in for set of common keys to trigger clue window -- Explicitly opt-in for set of common keys to trigger clue window
triggers = { triggers = {
{ mode = 'n', keys = '<Leader>' }, -- Leader triggers { mode = { 'n', 'x' }, keys = '<Leader>' }, -- Leader triggers
{ mode = 'x', keys = '<Leader>' },
{ mode = 'n', keys = '\\' }, -- mini.basics { mode = 'n', keys = '\\' }, -- mini.basics
{ mode = 'n', keys = '[' }, -- mini.bracketed { mode = { 'n', 'x' }, keys = '[' }, -- mini.bracketed
{ mode = 'n', keys = ']' }, { mode = { 'n', 'x' }, keys = ']' },
{ mode = 'x', keys = '[' },
{ mode = 'x', keys = ']' },
{ mode = 'i', keys = '<C-x>' }, -- Built-in completion { mode = 'i', keys = '<C-x>' }, -- Built-in completion
{ mode = 'n', keys = 'g' }, -- `g` key { mode = { 'n', 'x' }, keys = 'g' }, -- `g` key
{ mode = 'x', keys = 'g' }, { mode = { 'n', 'x' }, keys = "'" }, -- Marks
{ mode = 'n', keys = "'" }, -- Marks { mode = { 'n', 'x' }, keys = '`' },
{ mode = 'n', keys = '`' }, { mode = { 'n', 'x' }, keys = '"' }, -- Registers
{ mode = 'x', keys = "'" }, { mode = { 'i', 'c' }, keys = '<C-r>' },
{ mode = 'x', keys = '`' },
{ mode = 'n', keys = '"' }, -- Registers
{ mode = 'x', keys = '"' },
{ mode = 'i', keys = '<C-r>' },
{ mode = 'c', keys = '<C-r>' },
{ mode = 'n', keys = '<C-w>' }, -- Window commands { mode = 'n', keys = '<C-w>' }, -- Window commands
{ mode = 'n', keys = 'z' }, -- `z` key { mode = { 'n', 'x' }, keys = 's' }, -- `s` key (mini.surround, etc.)
{ mode = 'x', keys = 'z' }, { mode = { 'n', 'x' }, keys = 'z' }, -- `z` key
}, },
window = { window = {
config = { config = {
width = 50, width = 50,
}, }
}, }
}) })
end) end)