From e3e1ddce9558ddad360f1109d48ff9c7c66e4e19 Mon Sep 17 00:00:00 2001 From: Atsuya Takagi Date: Thu, 14 Jan 2021 09:52:36 +0900 Subject: [PATCH] allow setting vala-lint executable --- ale_linters/vala/vala_lint.vim | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ale_linters/vala/vala_lint.vim b/ale_linters/vala/vala_lint.vim index 45e9b7d8..39879303 100644 --- a/ale_linters/vala/vala_lint.vim +++ b/ale_linters/vala/vala_lint.vim @@ -3,9 +3,14 @@ call ale#Set('vala_vala_lint_enable_config', 0) call ale#Set('vala_vala_lint_config_filename', 'vala-lint.conf') +call ale#Set('vala_vala_lint_executable', 'io.elementary.vala-lint') + +function! ale_linters#vala#vala_lint#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'vala_vala_lint_executable') +endfunction function! ale_linters#vala#vala_lint#GetCommand(buffer) abort - let l:command = 'io.elementary.vala-lint ' + let l:command = ale_linters#vala#vala_lint#GetExecutable(a:buffer) if ale#Var(a:buffer, 'vala_vala_lint_enable_config') let l:config_filename = ale#Var(a:buffer, 'vala_vala_lint_config_filename') @@ -57,7 +62,7 @@ endfunction call ale#linter#Define('vala', { \ 'name': 'vala-lint', \ 'output_stream': 'stdout', -\ 'executable': 'io.elementary.vala-lint', +\ 'executable': function('ale_linters#vala#vala_lint#GetExecutable'), \ 'command': function('ale_linters#vala#vala_lint#GetCommand'), \ 'callback': 'ale_linters#vala#vala_lint#Handle', \ 'lint_file': 1,