Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

can not load this plugin correctly in nvim 0.9 on windows #15

Open
lee-shun opened this issue May 8, 2023 · 1 comment
Open

can not load this plugin correctly in nvim 0.9 on windows #15

lee-shun opened this issue May 8, 2023 · 1 comment

Comments

@lee-shun
Copy link

lee-shun commented May 8, 2023

I load the asyncomplete.vim on the event "BufReadPre" with dein.vim

every time I open the buffer, the messages says:

Error detected while processing function <SNR>101_on_stdout[1]..<SNR>101_complete:
line    1:
E909: Cannot index a special variable

I am try to debug it myself, can you help me out?

I have a minial nvim config for test:

  1. init.vim
let $CONF_PATH = split(&runtimepath, ',')[0]
set runtimepath+=$CONF_PATH/dein/repos/github.com/Shougo/dein.vim

let s:dein_dir = $CONF_PATH.'/dein'
let s:dein_src = $CONF_PATH.'/dein/repos/github.com/Shougo/dein.vim'

call dein#begin(s:dein_dir)
call dein#add('kitagry/asyncomplete-tabnine.vim', { 'lazy':1,
			\'build': 'powershell.exe .\install.ps1' })

let g:asyncomplete_conf = { 'lazy':1,
			\'depends': ['asyncomplete-tabnine.vim'],
			\'on_event': ['BufReadPre', 'BufNew'],
			\'hook_source':'let g:asyncomplete_auto_popup = 1',
			\'hook_post_source':'source $CONF_PATH/after_test.vim'}

call dein#add('prabirshrestha/asyncomplete.vim', g:asyncomplete_conf)

call dein#end()

filetype indent plugin on

" Enable syntax highlighting
if has('syntax')
	syntax on
endif
  1. after_test.vim
function! s:check_back_space() abort
    let col = col('.') - 1
    return !col || getline('.')[col - 1]  =~ '\s'
endfunction

inoremap <silent><expr> <TAB>
            \ pumvisible() ? "\<C-n>" :
            \ <SID>check_back_space() ? "\<TAB>" :
            \ asyncomplete#force_refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"

if dein#tap('asyncomplete-tabnine.vim')
    call asyncomplete#register_source(asyncomplete#sources#tabnine#get_source_options({
                \ 'name': 'tabnine',
                \ 'allowlist': ['*'],
                \ 'completor': function('asyncomplete#sources#tabnine#completor'),
                \ 'config': {
                \   'line_limit': 1000,
                \   'max_num_result': 4,
                \  },
                \ }))
endif
@kitagry
Copy link
Owner

kitagry commented May 9, 2023

I'm sorry. I will archive this repository because I don't use asyncomplete.vim anymore.

So, if you want to use this, please fork this project. Thank you 🙇

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants