新增:whichkey插件

This commit is contained in:
2025-07-16 16:09:06 +08:00
parent dbb3f1db68
commit cd71c38c1a
3 changed files with 21 additions and 1 deletions

View File

@ -169,7 +169,6 @@ export def Install()
title: 'Plugins - ' .. tui#core#cached#Get('tui.plug.home'),
minwidth: minwidth,
callback: (_, index) => {
echo index
if index > 0
var plug_id = tui_plug_ids[index - 1]
var plug_info = tui_plug_registed[plug_id]

View File

@ -6,3 +6,4 @@ TuiLayer plug.nerdtree
TuiLayer plug.poplar
TuiLayer plug.whichkey

20
layers/plug/whichkey.vim Normal file
View File

@ -0,0 +1,20 @@
vim9script
const g:which_key_map = {
f: {
name: 'File',
o: ['Poplar', 'open']
},
v: {
name: 'View',
f: [":NERDTreeToggle", "nerdtree"]
}
}
tui#core#plug#Regist('liuchengxu/vim-which-key', {
config: () => {
which_key#register('<Space>', "g:which_key_map")
nnoremap <silent> <Space> :WhichKey '<Space>'<CR>
}
})