diff options
author | w0rp <devw0rp@gmail.com> | 2017-06-08 17:28:38 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-06-09 09:47:19 +0100 |
commit | 51463322066a1d1bf3537b31e7b330861e0cf283 (patch) | |
tree | abfde136e621dab2e36ab39164be061fcf3c8b3b /ale_linters/typescript | |
parent | 64ad51048d8f490b57ca6e74864f4de3777ec2a7 (diff) | |
download | ale-51463322066a1d1bf3537b31e7b330861e0cf283.zip |
Add tsserver support
Diffstat (limited to 'ale_linters/typescript')
-rw-r--r-- | ale_linters/typescript/tsserver.vim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ale_linters/typescript/tsserver.vim b/ale_linters/typescript/tsserver.vim new file mode 100644 index 00000000..332e32e5 --- /dev/null +++ b/ale_linters/typescript/tsserver.vim @@ -0,0 +1,23 @@ +" Author: w0rp <devw0rp@gmail.com> +" Description: tsserver integration for ALE + +call ale#Set('typescript_tsserver_executable', 'tsserver') +call ale#Set('typescript_tsserver_config_path', '') +call ale#Set('typescript_tsserver_use_global', 0) + +function! ale_linters#typescript#tsserver#GetExecutable(buffer) abort + return ale#node#FindExecutable(a:buffer, 'typescript_tsserver', [ + \ 'node_modules/.bin/tsserver', + \]) +endfunction + +function! ale_linters#typescript#tsserver#Handle(buffer, lines) abort + return a:lines +endfunction + +call ale#linter#Define('typescript', { +\ 'name': 'tsserver', +\ 'lsp': 'tsserver', +\ 'executable_callback': 'ale_linters#typescript#tsserver#GetExecutable', +\ 'callback': 'ale_linters#typescript#tsserver#Handle', +\}) |