Don't mess with compleopt for each completion, as it doesn't work
This commit is contained in:
parent
af6830a722
commit
ee6dabcc4e
@ -102,21 +102,15 @@ function! ale#completion#Show(response, completion_parser) abort
|
|||||||
" Remember the old omnifunc value, if there is one.
|
" Remember the old omnifunc value, if there is one.
|
||||||
" If we don't store an old one, we'll just never reset the option.
|
" If we don't store an old one, we'll just never reset the option.
|
||||||
" This will stop some random exceptions from appearing.
|
" This will stop some random exceptions from appearing.
|
||||||
if !exists('b:ale_old_omnifunc') && !empty(&omnifunc)
|
if !exists('b:ale_old_omnifunc') && !empty(&l:omnifunc)
|
||||||
let b:ale_old_omnifunc = &omnifunc
|
let b:ale_old_omnifunc = &l:omnifunc
|
||||||
endif
|
|
||||||
|
|
||||||
" Remember the old completion options, if they are set.
|
|
||||||
if !exists('b:ale_old_completeopt') && !empty(&completeopt)
|
|
||||||
let b:ale_old_completeopt = &completeopt
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Set the list in the buffer, temporarily replace omnifunc with our
|
" Set the list in the buffer, temporarily replace omnifunc with our
|
||||||
" function, and then start omni-completion.
|
" function, and then start omni-completion.
|
||||||
let b:ale_completion_response = a:response
|
let b:ale_completion_response = a:response
|
||||||
let b:ale_completion_parser = a:completion_parser
|
let b:ale_completion_parser = a:completion_parser
|
||||||
let &omnifunc = 'ale#completion#OmniFunc'
|
let &l:omnifunc = 'ale#completion#OmniFunc'
|
||||||
let &completeopt = 'menu,noinsert,noselect'
|
|
||||||
call feedkeys("\<C-x>\<C-o>", 'n')
|
call feedkeys("\<C-x>\<C-o>", 'n')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@ -306,14 +300,9 @@ function! ale#completion#Done() abort
|
|||||||
|
|
||||||
" Reset settings when completion is done.
|
" Reset settings when completion is done.
|
||||||
if exists('b:ale_old_omnifunc')
|
if exists('b:ale_old_omnifunc')
|
||||||
let &omnifunc = b:ale_old_omnifunc
|
let &l:omnifunc = b:ale_old_omnifunc
|
||||||
unlet b:ale_old_omnifunc
|
unlet b:ale_old_omnifunc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if exists('b:ale_old_completeopt')
|
|
||||||
let &completeopt = b:ale_old_completeopt
|
|
||||||
unlet b:ale_old_completeopt
|
|
||||||
endif
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:Setup(enabled) abort
|
function! s:Setup(enabled) abort
|
||||||
|
Loading…
Reference in New Issue
Block a user