summaryrefslogtreecommitdiff
path: root/ale_linters/html
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2022-01-05 11:34:30 +0000
committerw0rp <devw0rp@gmail.com>2022-01-05 11:34:30 +0000
commit11a90ad0ff0893118cd0b09de914c53f5683eeef (patch)
tree0d80b73daef547260e7a14fa75626510d736fe09 /ale_linters/html
parentac0495df6ef44deff556ed450f503875370f0812 (diff)
downloadale-11a90ad0ff0893118cd0b09de914c53f5683eeef.zip
Fix execution of the Angular language server for HTML files
Diffstat (limited to 'ale_linters/html')
-rw-r--r--ale_linters/html/angular.vim16
1 files changed, 10 insertions, 6 deletions
diff --git a/ale_linters/html/angular.vim b/ale_linters/html/angular.vim
index 17c0a751..4f368fb4 100644
--- a/ale_linters/html/angular.vim
+++ b/ale_linters/html/angular.vim
@@ -11,10 +11,7 @@ function! ale_linters#html#angular#GetProjectRoot(buffer) abort
endfunction
function! ale_linters#html#angular#GetExecutable(buffer) abort
- return ale#path#FindExecutable(a:buffer, 'html_angular', [
- \ 'node_modules/@angular/language-server/bin/ngserver',
- \ 'node_modules/@angular/language-server/index.js',
- \])
+ return 'node'
endfunction
function! ale_linters#html#angular#GetCommand(buffer) abort
@@ -34,9 +31,16 @@ function! ale_linters#html#angular#GetCommand(buffer) abort
\ fnamemodify(l:language_service_dir, ':h:h')
\ . '/typescript'
\)
- let l:executable = ale_linters#html#angular#GetExecutable(a:buffer)
+ let l:script = ale#path#FindExecutable(a:buffer, 'html_angular', [
+ \ 'node_modules/@angular/language-server/bin/ngserver',
+ \ 'node_modules/@angular/language-server/index.js',
+ \])
+
+ if !filereadable(l:script)
+ return ''
+ endif
- return ale#node#Executable(a:buffer, l:executable)
+ return ale#Escape('node') . ' ' . ale#Escape(l:script)
\ . ' --ngProbeLocations ' . ale#Escape(l:language_service_dir)
\ . ' --tsProbeLocations ' . ale#Escape(l:typescript_dir)
\ . ' --stdio'