summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorHoracio Sanson <hsanson@gmail.com>2021-01-23 11:04:52 +0900
committerGitHub <noreply@github.com>2021-01-23 11:04:52 +0900
commitc37473630189a597f20016d11ba3ba1ae0bd6923 (patch)
treed91b397ee7c6e2131818bb2f25757d61dbb79ca8 /ale_linters
parent5200e6c73460232de7c8ea7659cea2429e02e2a0 (diff)
parentfe666a7a6c38a7026b1969e6be00eb5d380f8b13 (diff)
downloadale-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.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