summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2019-02-15 15:34:31 +0000
committerw0rp <devw0rp@gmail.com>2019-02-15 15:34:31 +0000
commit5b6df0a85fbed8081fa217473a8c52f3b406faff (patch)
treee7e66d330f4e18b7880850fa4f5ef367ecb804a4
parent1a69c9c88ccb97655ee75c9fe02dcc81bc228626 (diff)
downloadale-5b6df0a85fbed8081fa217473a8c52f3b406faff.zip
Fix #2299 - Make tsserver run again
-rw-r--r--autoload/ale/lsp.vim2
-rw-r--r--autoload/ale/lsp_linter.vim9
2 files changed, 6 insertions, 5 deletions
diff --git a/autoload/ale/lsp.vim b/autoload/ale/lsp.vim
index 7718b349..8da95ef6 100644
--- a/autoload/ale/lsp.vim
+++ b/autoload/ale/lsp.vim
@@ -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
diff --git a/autoload/ale/lsp_linter.vim b/autoload/ale/lsp_linter.vim
index e04915b0..610d897f 100644
--- a/autoload/ale/lsp_linter.vim
+++ b/autoload/ale/lsp_linter.vim
@@ -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,