Fix #2299 - Make tsserver run again
This commit is contained in:
parent
1a69c9c88c
commit
5b6df0a85f
@ -347,7 +347,7 @@ function! ale#lsp#StartProgram(conn_id, executable, command) abort
|
||||
let l:conn.job_id = l:job_id
|
||||
endif
|
||||
|
||||
if l:started
|
||||
if l:started && !l:conn.is_tsserver
|
||||
call s:SendInitMessage(l:conn)
|
||||
endif
|
||||
|
||||
|
@ -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)
|
||||
|
||||
" 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)
|
||||
" 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]
|
||||
@ -253,10 +258,6 @@ function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort
|
||||
return 0
|
||||
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 = {
|
||||
\ 'buffer': a:buffer,
|
||||
|
Loading…
Reference in New Issue
Block a user