Get automatic completion with tsserver to work

This commit is contained in:
w0rp 2017-07-02 00:28:00 +01:00
parent 5b731f761f
commit b731bd77ab
5 changed files with 307 additions and 116 deletions

View file

@ -181,6 +181,11 @@ call ale#Set('maximum_file_size', 0)
" Remapping of linter problems.
call ale#Set('type_map', {})
" Enable automatic completion with LSP servers and tsserver
call ale#Set('completion_enabled', 0)
call ale#Set('completion_delay', 300)
call ale#Set('completion_max_suggestions', 20)
function! ALEInitAuGroups() abort
" This value used to be a Boolean as a Number, and is now a String.
let l:text_changed = '' . g:ale_lint_on_text_changed
@ -313,6 +318,10 @@ if g:ale_set_balloons
call ale#balloon#Enable()
endif
if g:ale_completion_enabled
call ale#completion#Enable()
endif
" Define commands for moving through warnings and errors.
command! -bar ALEPrevious :call ale#loclist_jumping#Jump('before', 0)
command! -bar ALEPreviousWrap :call ale#loclist_jumping#Jump('before', 1)