fix: use augroups This avoid having the callbacks called twice TODO: move this autocommand setup in the setup function ?
1 files changed, 6 insertions(+), 3 deletions(-) M plugin/complementree.vim
M plugin/complementree.vim => plugin/complementree.vim +6 -3
@@ 1,5 1,8 @@ " Last Change: 2021 Dec 11 " Last Change: 2024 Mar 07 imap <Plug>(complementree-complete) <cmd>lua require"complementree".complete()<CR> autocmd CompleteDone * lua require'complementree'._CompleteDone() autocmd InsertCharPre * lua require'complementree'._InsertCharPre() augroup complementree au! autocmd CompleteDone * lua require'complementree'._CompleteDone() autocmd InsertCharPre * lua require'complementree'._InsertCharPre() augroup END