diff options
author | w0rp <devw0rp@gmail.com> | 2017-06-13 17:54:07 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-06-13 17:54:07 +0100 |
commit | ebbfb642211d9a8199e9b1da0c8f3077f953a2c9 (patch) | |
tree | 75588a775ad9fdbb91915bc2be94f784a3a74186 /ale_linters | |
parent | 86c17e18347eb1cb3332b4197cbd1c82e1b567d3 (diff) | |
parent | aef58f598cd66e4be971bf3c9b91af94fbf09858 (diff) | |
download | ale-ebbfb642211d9a8199e9b1da0c8f3077f953a2c9.zip |
Merge branch 'tsserver'
Diffstat (limited to 'ale_linters')
-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', +\}) |