girishji / vimcomplete

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

Omnifunc Completor does not work #29

Closed phongnh closed 6 months ago

phongnh commented 6 months ago

Hi @girishji,

Currently, Omnifunc Completor is crashed on startup, please check screenshot

image

Here is my minimal vimrc config

" min.vimrc

set encoding=utf-8
scriptencoding utf-8

set nocompatible
set cmdheight=2
set termguicolors

set runtimepath^=~/.vim/plugged/vimcomplete

syntax on
filetype plugin indent on

function! s:SetupVimComplete() abort
    call VimCompleteOptionsSet({
                \ 'lsp': {
                \   'enable': v:false,
                \   'maxCount': 10,
                \   'priority': 11,
                \ },
                \ 'omnifunc': {
                \   'enable': v:true,
                \   'filetypes': ['*'],
                \   'priority': 11,
                \ },
                \ })
endfunction

augroup MyAutoCmd
    autocmd VimEnter * call <SID>SetupVimComplete()
augroup END

Could you please help check this issue, thanks.

girishji commented 6 months ago

Please try now. It should be fixed.

Angluca commented 6 months ago
Error detected while compiling VimEnter Autocommands for "*"..function VimComple
teOptionsSet[17]..<SNR>124_RegisterPlugins[11]..<lambda>30[4]..buffer#Completor[
38]..<SNR>126_BufWords:
line   35:
E1012: Type mismatch; expected list<dict<any>> but got list<string>
Error detected while compiling VimEnter Autocommands for "*"..function VimComple
teOptionsSet[17]..<SNR>124_RegisterPlugins[11]..<lambda>30[4]..buffer#Completor[
38]..<SNR>126_BufWords:
line   35:
E1028: Compiling :def function failed

autoload/buffer.vim def BufWords(bufnr: number, prefix: string, curbuf: bool = false): list<dict<any>> return type list<dict<any>> change to list<any> is ok.

phongnh commented 6 months ago

Please try now. It should be fixed.

It was fixed now. Thank you very much.

girishji commented 6 months ago

Angluca's issue tracked in a separate thread.