summaryrefslogtreecommitdiff
path: root/ale_linters/javascript/tsserver.vim
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-08-03 17:22:09 +0100
committerw0rp <devw0rp@gmail.com>2018-08-03 17:22:09 +0100
commit209cd547839c78403a2453d6a1e454d121103e28 (patch)
tree1294c968cd8060b195e21be7a59efb36d36adf2d /ale_linters/javascript/tsserver.vim
parentfefb8efff864be55ec7273cc9dc225b90c92fa78 (diff)
downloadale-209cd547839c78403a2453d6a1e454d121103e28.zip
Fix #1781 - Fix me breaking the tsserver linter
Diffstat (limited to 'ale_linters/javascript/tsserver.vim')
-rw-r--r--ale_linters/javascript/tsserver.vim19
1 files changed, 5 insertions, 14 deletions
diff --git a/ale_linters/javascript/tsserver.vim b/ale_linters/javascript/tsserver.vim
index 62dded10..6cf08dd6 100644
--- a/ale_linters/javascript/tsserver.vim
+++ b/ale_linters/javascript/tsserver.vim
@@ -5,22 +5,13 @@ call ale#Set('javascript_tsserver_executable', 'tsserver')
call ale#Set('javascript_tsserver_config_path', '')
call ale#Set('javascript_tsserver_use_global', get(g:, 'ale_use_global_executables', 0))
-" These functions need to be defined just to comply with the API for LSP.
-function! ale_linters#javascript#tsserver#GetProjectRoot(buffer) abort
- return ''
-endfunction
-
-function! ale_linters#javascript#tsserver#GetExecutable(buffer) abort
- return ale#node#FindExecutable(a:buffer, 'javascript_tsserver', [
- \ 'node_modules/.bin/tsserver',
- \])
-endfunction
-
call ale#linter#Define('javascript', {
\ 'name': 'tsserver',
\ 'lsp': 'tsserver',
-\ 'executable_callback': 'ale_linters#javascript#tsserver#GetExecutable',
-\ 'command_callback': 'ale_linters#javascript#tsserver#GetExecutable',
-\ 'project_root_callback': 'ale_linters#javascript#tsserver#GetProjectRoot',
+\ 'executable_callback': ale#node#FindExecutableFunc('javascript_tsserver', [
+\ 'node_modules/.bin/tsserver',
+\ ]),
+\ 'command': '%e',
+\ 'project_root_callback': {-> ''},
\ 'language': '',
\})