diff options
Diffstat (limited to 'ale_linters')
-rw-r--r-- | ale_linters/elixir/elixir_ls.vim | 4 | ||||
-rw-r--r-- | ale_linters/haml/hamllint.vim | 10 | ||||
-rw-r--r-- | ale_linters/php/php.vim | 6 |
3 files changed, 15 insertions, 5 deletions
diff --git a/ale_linters/elixir/elixir_ls.vim b/ale_linters/elixir/elixir_ls.vim index d5ad7cfc..c1e8fdd6 100644 --- a/ale_linters/elixir/elixir_ls.vim +++ b/ale_linters/elixir/elixir_ls.vim @@ -1,7 +1,8 @@ " Author: Jon Parise <jon@indelible.org> -" Description: elixir-ls integration (https://github.com/JakeBecker/elixir-ls) +" Description: ElixirLS integration (https://github.com/JakeBecker/elixir-ls) call ale#Set('elixir_elixir_ls_release', 'elixir-ls') +call ale#Set('elixir_elixir_ls_config', {}) function! ale_linters#elixir#elixir_ls#GetExecutable(buffer) abort let l:dir = ale#path#Simplify(ale#Var(a:buffer, 'elixir_elixir_ls_release')) @@ -16,4 +17,5 @@ call ale#linter#Define('elixir', { \ 'executable_callback': 'ale_linters#elixir#elixir_ls#GetExecutable', \ 'command_callback': 'ale_linters#elixir#elixir_ls#GetExecutable', \ 'project_root_callback': 'ale#handlers#elixir#FindMixProjectRoot', +\ 'lsp_config_callback': ale#VarFunc('elixir_elixir_ls_config'), \}) diff --git a/ale_linters/haml/hamllint.vim b/ale_linters/haml/hamllint.vim index d6633599..6598f81a 100644 --- a/ale_linters/haml/hamllint.vim +++ b/ale_linters/haml/hamllint.vim @@ -1,6 +1,12 @@ " Author: Patrick Lewis - https://github.com/patricklewis, thenoseman - https://github.com/thenoseman " Description: haml-lint for Haml files +call ale#Set('haml_hamllint_executable', 'haml-lint') + +function! ale_linters#haml#hamllint#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'haml_hamllint_executable') +endfunction + function! ale_linters#haml#hamllint#GetCommand(buffer) abort let l:prefix = '' @@ -21,7 +27,7 @@ function! ale_linters#haml#hamllint#GetCommand(buffer) abort endif return (!empty(l:prefix) ? l:prefix . ' ' : '') - \ . 'haml-lint' + \ . ale_linters#haml#hamllint#GetExecutable(a:buffer) \ . (!empty(l:hamllint_config_file_path) ? ' --config ' . ale#Escape(l:hamllint_config_file_path) : '') \ . ' %t' endfunction @@ -45,7 +51,7 @@ endfunction call ale#linter#Define('haml', { \ 'name': 'hamllint', -\ 'executable': 'haml-lint', +\ 'executable_callback': 'ale_linters#haml#hamllint#GetExecutable', \ 'command_callback': 'ale_linters#haml#hamllint#GetCommand', \ 'callback': 'ale_linters#haml#hamllint#Handle' \}) diff --git a/ale_linters/php/php.vim b/ale_linters/php/php.vim index 6470383b..5d87196c 100644 --- a/ale_linters/php/php.vim +++ b/ale_linters/php/php.vim @@ -1,6 +1,8 @@ " Author: Spencer Wood <https://github.com/scwood>, Adriaan Zonnenberg <amz@adriaan.xyz> " Description: This file adds support for checking PHP with php-cli +call ale#Set('php_php_executable', 'php') + function! ale_linters#php#php#Handle(buffer, lines) abort " Matches patterns like the following: " @@ -30,8 +32,8 @@ endfunction call ale#linter#Define('php', { \ 'name': 'php', -\ 'executable': 'php', +\ 'executable_callback': ale#VarFunc('php_php_executable'), \ 'output_stream': 'stdout', -\ 'command': 'php -l -d error_reporting=E_ALL -d display_errors=1 -d log_errors=0 --', +\ 'command': '%e -l -d error_reporting=E_ALL -d display_errors=1 -d log_errors=0 --', \ 'callback': 'ale_linters#php#php#Handle', \}) |