Tell HHAST to only look at open files

Given ALE only cares about open files, this has no observable change,
except for significantly reduced resource usage.
This commit is contained in:
Fred Emmott 2018-08-02 14:23:03 -07:00
parent 9ef266d050
commit e3c81911d6
No known key found for this signature in database
GPG Key ID: 06C22A9D789FCA28
1 changed files with 5 additions and 0 deletions

View File

@ -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',
\})