diff options
author | Horacio Sanson <hsanson@gmail.com> | 2021-01-23 11:04:52 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-23 11:04:52 +0900 |
commit | c37473630189a597f20016d11ba3ba1ae0bd6923 (patch) | |
tree | d91b397ee7c6e2131818bb2f25757d61dbb79ca8 /ale_linters | |
parent | 5200e6c73460232de7c8ea7659cea2429e02e2a0 (diff) | |
parent | fe666a7a6c38a7026b1969e6be00eb5d380f8b13 (diff) | |
download | ale-c37473630189a597f20016d11ba3ba1ae0bd6923.zip |
Merge pull request #3533 from motato1/master
Deno support for LSP and fixer
Diffstat (limited to 'ale_linters')
-rw-r--r-- | ale_linters/typescript/deno.vim | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ale_linters/typescript/deno.vim b/ale_linters/typescript/deno.vim new file mode 100644 index 00000000..051cb208 --- /dev/null +++ b/ale_linters/typescript/deno.vim @@ -0,0 +1,25 @@ +" Author: Mohammed Chelouti - https://github.com/motato1 +" Description: Deno lsp linter for TypeScript files. + +call ale#linter#Define('typescript', { +\ 'name': 'deno', +\ 'lsp': 'stdio', +\ 'executable': function('ale#handlers#deno#GetExecutable'), +\ 'command': '%e lsp', +\ 'project_root': function('ale#handlers#deno#GetProjectRoot'), +\ 'initialization_options': function('ale_linters#typescript#deno#GetInitializationOptions'), +\}) + +function! ale_linters#typescript#deno#GetInitializationOptions(buffer) abort + let l:options = { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:false, + \ } + + if ale#Var(a:buffer, 'deno_unstable') + let l:options.unstable = v:true + endif + + return l:options +endfunction |