You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using vim-mucomplete with vim-go with a minimal chain, mu-complete does provide a full list of completions from omni. For example, if the chain only includes omni and path then typing signal. will show a partial list:
signal.Ignore ...
signal.Ignored ...
signal.Notify ...
This list apparently is limited to the first three possibilities. Typing <C-x><C-o> will pull up the full list.
However, if the chain includes keyn or one of a few other choices, then the a full list is displayed following the period, which has in addition to the previous list:
signal.NotifyContext ...
signal.Reset ...
signal.Stop ...
NOTE: This presumes no mistake is made during typing. If someone types a little then hits backspace/delete, then typing the period will show a complete list.
NOTE: If the Go package is not already loaded via an import, then the completion will show the full list.
Minimal vimrc appended to troubleshooting_vimrc.vim:
" Prepend vim-go to avoid b:did_ftplugin being set by Vim runtime." See: https://github.com/fatih/vim-go/issues/1997setruntimepath^=~/.vim/plugged/vim-gosetruntimepath+=~/.vim/plugged/vim-mucomplete" Optionally add additional configuration below this linesetcompleteopt+=noselect
setbackspace=indent,eol,start" Restore backspace.inoremap<silent><plug>(MUcompleteFwdKey)<right>imap<right><plug>(MUcompleteCycFwd)inoremap<silent><plug>(MUcompleteBwdKey)<left>imap<left><plug>(MUcompleteCycBwd)letg:mucomplete#enable_auto_at_startup =1letg:mucomplete#minimum_prefix_length =1letg:mucomplete#can_complete = {}
letg:mucomplete#can_complete.go= {
\ 'omni': { t-> t=~# '\m\k\%(\k\|\.\)$' } }
letg:mucomplete#chains = {
\ 'go' : ['omni', 'path']
\ }
Minimal Go: tiny.go
package main
import"os/signal"funcmain() {
signal.Ignore()
}
go.mod
moduletinygo1.19
The text was updated successfully, but these errors were encountered:
let g:mucomplete#completion_delay = 50
let g:mucomplete#reopen_immediately = 0
They did not help exactly, even if omni was the only option in Go's chain. However, I tried g:mucomplete#completion_delay = 5000. If I type signal. quick enough, then it does provide the full list.
What is the value of omnifunc? I am trying your vimrc, but when I set the filetype to Go, omnifunc remains empty.
omnifunc=go#complete#Complete
I needed the following or my omnifunc was also empty. I spent more time on figuring how to get omnifunc to be set than anything else in the sample vimrc. If vim-go is not before $VIMRUNTIME, it will not be set as noted in that issue.
" Prepend vim-go to avoid b:did_ftplugin being set by Vim runtime." See: https://github.com/fatih/vim-go/issues/1997setruntimepath^=~/.vim/plugged/vim-go
When using vim-mucomplete with vim-go with a minimal chain, mu-complete does provide a full list of completions from
omni
. For example, if the chain only includesomni
andpath
then typingsignal.
will show a partial list:signal.Ignore ...
signal.Ignored ...
signal.Notify ...
This list apparently is limited to the first three possibilities. Typing
<C-x><C-o>
will pull up the full list.However, if the chain includes
keyn
or one of a few other choices, then the a full list is displayed following the period, which has in addition to the previous list:signal.NotifyContext ...
signal.Reset ...
signal.Stop ...
NOTE: This presumes no mistake is made during typing. If someone types a little then hits backspace/delete, then typing the period will show a complete list.
NOTE: If the Go package is not already loaded via an import, then the completion will show the full list.
Minimal vimrc appended to
troubleshooting_vimrc.vim
:Minimal Go:
tiny.go
go.mod
The text was updated successfully, but these errors were encountered: