💅 style(which-key): update window and layout settings in 'which-key.lua' for better UX
This commit is contained in:
1 file changed
+1
-23
@@ -4,7 +4,7 @@ local util = require('lib.util')
|
|||||||
local prompts = require('lib.prompts')
|
local prompts = require('lib.prompts')
|
||||||
|
|
||||||
local setup = {
|
local setup = {
|
||||||
preset = 'modern',
|
preset = 'helix',
|
||||||
plugins = {
|
plugins = {
|
||||||
marks = true,
|
marks = true,
|
||||||
registers = true,
|
registers = true,
|
||||||
@@ -31,24 +31,6 @@ local setup = {
|
|||||||
},
|
},
|
||||||
rules = false, -- enable auto icon rules
|
rules = false, -- enable auto icon rules
|
||||||
},
|
},
|
||||||
win = {
|
|
||||||
no_overlap = true,
|
|
||||||
border = 'rounded',
|
|
||||||
width = 0.8,
|
|
||||||
height = { min = 5, max = 25 },
|
|
||||||
padding = { 1, 2 },
|
|
||||||
title = true,
|
|
||||||
title_pos = 'center',
|
|
||||||
zindex = 1000,
|
|
||||||
wo = {
|
|
||||||
winblend = 10,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
layout = {
|
|
||||||
width = { min = 20 },
|
|
||||||
spacing = 6,
|
|
||||||
align = 'center',
|
|
||||||
},
|
|
||||||
show_help = false,
|
show_help = false,
|
||||||
show_keys = true,
|
show_keys = true,
|
||||||
triggers = {
|
triggers = {
|
||||||
@@ -145,7 +127,6 @@ local normal_mappings = {
|
|||||||
{ '<leader>i', group = ' Insert' },
|
{ '<leader>i', group = ' Insert' },
|
||||||
{ '<leader>id', ":put =strftime('## %a, %d %b, %Y, %r')<cr>", desc = 'Date' },
|
{ '<leader>id', ":put =strftime('## %a, %d %b, %Y, %r')<cr>", desc = 'Date' },
|
||||||
{ '<leader>if', ":put =expand('%:t')<cr>", desc = 'File Name' },
|
{ '<leader>if', ":put =expand('%:t')<cr>", desc = 'File Name' },
|
||||||
{ '<leader>in', ':Nerdy<cr>', desc = 'Nerd Glyphs' },
|
|
||||||
{ '<leader>ip', ':put %<cr>', desc = 'Relative Path' },
|
{ '<leader>ip', ':put %<cr>', desc = 'Relative Path' },
|
||||||
{ '<leader>iP', ':put %:p<cr>', desc = 'Absolute Path' },
|
{ '<leader>iP', ':put %:p<cr>', desc = 'Absolute Path' },
|
||||||
{ '<leader>it', ":put =strftime('## %r')<cr>", desc = 'Time' },
|
{ '<leader>it', ":put =strftime('## %r')<cr>", desc = 'Time' },
|
||||||
@@ -219,7 +200,6 @@ local normal_mappings = {
|
|||||||
{ '<leader>mt', ":lua require('markit').toggle()<cr>", desc = 'Toggle' },
|
{ '<leader>mt', ":lua require('markit').toggle()<cr>", desc = 'Toggle' },
|
||||||
{ '<leader>mx', ":lua require('markit').delete_bookmark()<cr>", desc = 'Delete Bookmark' },
|
{ '<leader>mx', ":lua require('markit').delete_bookmark()<cr>", desc = 'Delete Bookmark' },
|
||||||
|
|
||||||
|
|
||||||
{ '<leader>o', group = ' Options' },
|
{ '<leader>o', group = ' Options' },
|
||||||
{ '<leader>oi', 'vim.show_pos', desc = 'Inspect Position' },
|
{ '<leader>oi', 'vim.show_pos', desc = 'Inspect Position' },
|
||||||
{ '<leader>oN', ':lua Snacks.notifier.show_history()<cr>', desc = 'Notification History' },
|
{ '<leader>oN', ':lua Snacks.notifier.show_history()<cr>', desc = 'Notification History' },
|
||||||
@@ -434,8 +414,6 @@ local visual_mappings = {
|
|||||||
},
|
},
|
||||||
{ '<leader>pi', '<cmd>CodeSnapASCII<cr>', mode = 'x', desc = 'Save ASCII code snapshot into clipboard' },
|
{ '<leader>pi', '<cmd>CodeSnapASCII<cr>', mode = 'x', desc = 'Save ASCII code snapshot into clipboard' },
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{ '<leader>y', group = ' Yank' },
|
{ '<leader>y', group = ' Yank' },
|
||||||
{ '<leader>yg', ':lua require"gitlinker".get_buf_range_url("v")<cr>', desc = 'Copy Git URL' },
|
{ '<leader>yg', ':lua require"gitlinker".get_buf_range_url("v")<cr>', desc = 'Copy Git URL' },
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user