summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2018-08-03 09:12:12 +0100
committerGitHub <noreply@github.com>2018-08-03 09:12:12 +0100
commitfefb8efff864be55ec7273cc9dc225b90c92fa78 (patch)
treebe94d4dc37fc85c9b578b9bff707202764a4e06a
parent41178425aba501be0fa70e18e3ad673395c2bb49 (diff)
parente3c81911d698db95fdafb6df734d294aa27c303c (diff)
downloadale-fefb8efff864be55ec7273cc9dc225b90c92fa78.zip
Merge pull request #1778 from fredemmott/hhast-perf
Tell HHAST to only look at open files
-rw-r--r--ale_linters/hack/hhast.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/ale_linters/hack/hhast.vim b/ale_linters/hack/hhast.vim
index 5070dc4e..710b7b25 100644
--- a/ale_linters/hack/hhast.vim
+++ b/ale_linters/hack/hhast.vim
@@ -26,10 +26,15 @@ function! ale_linters#hack#hhast#GetExecutable(buffer) abort
return !empty(l:absolute) ? l:absolute : ''
endfunction
+function! ale_linters#hack#hhast#GetInitializationOptions(buffer) abort
+ return {'lintMode': 'open-files'}
+endfunction
+
call ale#linter#Define('hack', {
\ 'name': 'hhast',
\ 'lsp': 'stdio',
\ 'executable_callback': 'ale_linters#hack#hhast#GetExecutable',
\ 'command': '%e --mode lsp --from vim-ale',
\ 'project_root_callback': 'ale_linters#hack#hhast#GetProjectRoot',
+\ 'initialization_options_callback': 'ale_linters#hack#hhast#GetInitializationOptions',
\})