diff --git a/autoload/tui/core/plug.vim b/autoload/tui/core/plug.vim index 293c53e..fe2a731 100644 --- a/autoload/tui/core/plug.vim +++ b/autoload/tui/core/plug.vim @@ -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] diff --git a/layers/plug/init.vim b/layers/plug/init.vim index 4aa7e73..6bef8d0 100644 --- a/layers/plug/init.vim +++ b/layers/plug/init.vim @@ -6,3 +6,4 @@ TuiLayer plug.nerdtree TuiLayer plug.poplar +TuiLayer plug.whichkey diff --git a/layers/plug/whichkey.vim b/layers/plug/whichkey.vim new file mode 100644 index 0000000..e4c1cbd --- /dev/null +++ b/layers/plug/whichkey.vim @@ -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('', "g:which_key_map") + nnoremap :WhichKey '' + } +}) +