From 11d9d45594abd2c9d75d6bb98d1ed3a25e461826 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sat, 21 Oct 2023 08:34:35 +0800 Subject: Remove the default trigger of mucomplete. The omnifunc sometimes is triggered unexpectedly, causing the vim to freeze for a long time. For example, triggered in a large yaml file. --- .vim/after/plugin/mucomplete.vim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to '.vim/after') diff --git a/.vim/after/plugin/mucomplete.vim b/.vim/after/plugin/mucomplete.vim index b955c14..3efbcbe 100644 --- a/.vim/after/plugin/mucomplete.vim +++ b/.vim/after/plugin/mucomplete.vim @@ -6,7 +6,6 @@ let g:mucomplete#always_use_completeopt = 1 let g:mucomplete#can_complete = {} let s:default_cond = { t -> strlen(&omnifunc) > 0 && t =~# '\%(\.\)$' } -let g:mucomplete#can_complete.default = { 'omni': s:default_cond } let g:mucomplete#chains = {} let g:mucomplete#chains.default = \ [ 'ulti', 'user', 'omni', 'c-p', 'path' ] @@ -19,10 +18,10 @@ let s:cpp_cond = { t -> strlen(&omnifunc) > 0 && t =~# '\%(\.\|->\|::\)$' } let g:mucomplete#can_complete.cpp = { 'omni': s:cpp_cond } let g:mucomplete#can_complete.objcpp = { 'omni': s:cpp_cond } let g:mucomplete#can_complete.cuda = { 'omni': s:cpp_cond } +let g:mucomplete#can_complete.ruby = { 'omni': s:cpp_cond } +let g:mucomplete#can_complete.rust = { 'omni': s:cpp_cond } let s:ledger_cond = { t -> t =~# '\%(:\)$' } let g:mucomplete#can_complete.ledger = { 'omni': s:ledger_cond } -let g:mucomplete#can_complete.ruby = { 'omni': s:cpp_cond } - packadd vim-mucomplete -- cgit v1.2.3