summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorMohammed Chelouti <70812484+motato1@users.noreply.github.com>2020-12-29 21:46:02 +0100
committerMohammed Chelouti <70812484+motato1@users.noreply.github.com>2021-01-22 19:06:53 +0100
commit9b362634f7210657d94870b017e969bdcdda8de0 (patch)
treebb08e4a17bf156f54babd40207c6ee1f8ec51b5e /ale_linters
parent4f2666265a09cceac2e4091dc871107e418f1f67 (diff)
downloadale-9b362634f7210657d94870b017e969bdcdda8de0.zip
feat: Add Deno lsp support
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/typescript/deno.vim25
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