diff options
author | Atsuya Takagi <asoftonight@gmail.com> | 2021-01-04 16:17:33 +0900 |
---|---|---|
committer | Atsuya Takagi <asoftonight@gmail.com> | 2021-01-23 00:08:01 +0900 |
commit | 823b094f5618c9dd53a0a56bbf131ed077f4105b (patch) | |
tree | abf5d58a2f83cc572dddcef32c9ef93ed260d5ad | |
parent | 89403b4a0600011ad94d51a7aef9e26afe284fd6 (diff) | |
download | ale-823b094f5618c9dd53a0a56bbf131ed077f4105b.zip |
support flags for enable/disable config
-rw-r--r-- | ale_linters/vala/vala_lint.vim | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ale_linters/vala/vala_lint.vim b/ale_linters/vala/vala_lint.vim index a38bf9bf..24ade378 100644 --- a/ale_linters/vala/vala_lint.vim +++ b/ale_linters/vala/vala_lint.vim @@ -1,12 +1,18 @@ " Author: Atsuya Takagi <asoftonight@gmail.com> " Description: A linter for Vala using Vala-Lint. +let g:ale_vala_vala_lint_enable_config = get(g:, 'ale_vala_vala_lint_enable_config', 0) +let g:ale_vala_vala_lint_config_filename = get(g:, 'ale_vala_vala_lint_config_filename', 'vala-lint.conf') + function! ale_linters#vala#vala_lint#GetCommand(buffer) abort let l:command = 'io.elementary.vala-lint ' - let l:config_path = ale#path#FindNearestFile(a:buffer, 'vala-lint.conf') - if !empty(l:config_path) - let l:command .= '-c ' . l:config_path . ' ' + if ale#Var(a:buffer, 'vala_vala_lint_enable_config') + let l:config_filename = ale#Var(a:buffer, 'vala_vala_lint_config_filename') + let l:config_path = ale#path#FindNearestFile(a:buffer, l:config_filename) + if !empty(l:config_path) + let l:command .= '-c ' . l:config_path . ' ' + endif endif return l:command . '%s' |