From 280d2dedaeba09aad139e9b2c6ea37e3213083b4 Mon Sep 17 00:00:00 2001 From: Atsuya Takagi Date: Mon, 4 Jan 2021 15:49:29 +0900 Subject: [PATCH] find and use vala-lint config if exists --- ale_linters/vala/vala_lint.vim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ale_linters/vala/vala_lint.vim b/ale_linters/vala/vala_lint.vim index b0c86fcc..b53e9b86 100644 --- a/ale_linters/vala/vala_lint.vim +++ b/ale_linters/vala/vala_lint.vim @@ -2,7 +2,14 @@ " Description: A linter for Vala using Vala-Lint. function! ale_linters#vala#vala_lint#GetCommand(buffer) abort - return 'io.elementary.vala-lint %s' + 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 . ' ' + endif + + return l:command . '%s' endfunction function! ale_linters#vala#vala_lint#Handle(buffer, lines) abort