girishji / vimcomplete

Async autocompletion for Vim.
MIT License
111 stars 4 forks source link

Omni completion not work in GVIM in windows10 #66

Closed leoingru closed 2 months ago

leoingru commented 2 months ago

Tested with python programing, the completion menu could be invoke Only by keypress ctrl-x ctrl-o, but not automatically invoked when in windows10. This bug not happend under linux

girishji commented 2 months ago

ctrl-x ctrl-o triggers omni-completion. I do not use windows10. What is the output of :VimCompleteCompletors command?

leoingru commented 2 months ago

only buffer and path sources image

ctrl-x ctrl-o triggers omni-completion. I do not use windows10. What is the output of :VimCompleteCompletors command?

girishji commented 2 months ago

You have to enable either lsp or omnifunc. See the README.

leoingru commented 2 months ago

actually lsp is disabled, omni is enabled, my config works under linux but not win10

vim9script
g:vimcomplete_tab_enable = 0
var options = {
    showSource: true,
    alwaysOn: false,
    completor: { shuffleEqualPriority: true, postfixHighlight: true },
    buffer: { enable: true, priority: 10, urlComplete: true, envComplete: true },
    abbrev: { enable: true, priority: 10 },
    omnifunc: { enable: true, priority: 8},
    vsnip: { enable: true, priority: 16 },
    vimscript: { enable: true, priority: 12 },
    lsp: { enable: false, priority: 10, maxCount: 5 },
    ngram: { enable: false, priority: 10 },
}
autocmd VimEnter * g:VimCompleteOptionsSet(options)
leoingru commented 2 months ago

above config gave me below sources when Linux image

girishji commented 2 months ago

what do you see when you do :echo &omnifunc or :set omnifunc? in windows?

leoingru commented 2 months ago

:echo &omnifunc gave me empty string, and :set omnifunc? resulted in omnifunc=

what do you see when you do :echo &omnifunc or :set omnifunc? in windows?

girishji commented 2 months ago

So, there is the problem. You should see python3complete#Complete (compare in Linux). Your Vim installation may have issues on Windows. Or, maybe python is not correctly installed, for Vim to find.

leoingru commented 2 months ago

sorry, I forgot open python file before checking omni setting, accutualy it gave me python3complete#Complete when a python file opend in Win10

girishji commented 2 months ago

Can you upgrade and try now?

leoingru commented 2 months ago

Can you upgrade and try now?

not work , this is what I got aftter opening a test.py file image

girishji commented 2 months ago

Mmm, why no omnifunc, vsnip, abbrev? You have not configured VimComplete through g:VimCompleteOptionsSet(). Check your .vimrc on windows10