Fix #2299 - Make tsserver run again

This commit is contained in:
w0rp 2019-02-15 15:34:31 +00:00
parent 1a69c9c88c
commit 5b6df0a85f
No known key found for this signature in database
GPG Key ID: 0FC1ECAA8C81CD83
2 changed files with 6 additions and 5 deletions

View File

@ -347,7 +347,7 @@ function! ale#lsp#StartProgram(conn_id, executable, command) abort
let l:conn.job_id = l:job_id let l:conn.job_id = l:job_id
endif endif
if l:started if l:started && !l:conn.is_tsserver
call s:SendInitMessage(l:conn) call s:SendInitMessage(l:conn)
endif endif

View File

@ -238,6 +238,11 @@ function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort
let l:conn_id = ale#lsp#Register(l:executable, l:root, l:init_options) let l:conn_id = ale#lsp#Register(l:executable, l:root, l:init_options)
" tsserver behaves differently, so tell the LSP API that it is tsserver.
if a:linter.lsp is# 'tsserver'
call ale#lsp#MarkConnectionAsTsserver(l:conn_id)
endif
let l:command = ale#linter#GetCommand(a:buffer, a:linter) let l:command = ale#linter#GetCommand(a:buffer, a:linter)
" Format the command, so %e can be formatted into it. " Format the command, so %e can be formatted into it.
let l:command = ale#command#FormatCommand(a:buffer, l:executable, l:command, 0, v:false)[1] let l:command = ale#command#FormatCommand(a:buffer, l:executable, l:command, 0, v:false)[1]
@ -253,10 +258,6 @@ function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort
return 0 return 0
endif endif
" tsserver behaves differently, so tell the LSP API that it is tsserver.
if a:linter.lsp is# 'tsserver'
call ale#lsp#MarkConnectionAsTsserver(l:conn_id)
endif
let l:details = { let l:details = {
\ 'buffer': a:buffer, \ 'buffer': a:buffer,