Reduce lines of code for tombi

This commit is contained in:
w0rp
2025-08-13 12:45:26 +01:00
parent d6f1a47647
commit 28573c8ada
6 changed files with 7 additions and 35 deletions

View File

@@ -6,11 +6,10 @@ call ale#Set('toml_tombi_format_options', '')
function! ale#fixers#tombi_format#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'toml_tombi_executable')
let l:options = ale#Var(a:buffer, 'toml_tombi_format_options')
return {
\ 'command': ale#Escape(l:executable)
\ . ' format'
\ . (empty(l:options) ? '' : ' ' . l:options),
\ . ale#Pad(ale#Var(a:buffer, 'toml_tombi_format_options')),
\}
endfunction

View File

@@ -6,11 +6,10 @@ call ale#Set('toml_tombi_lint_options', '')
function! ale#fixers#tombi_lint#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'toml_tombi_executable')
let l:options = ale#Var(a:buffer, 'toml_tombi_lint_options')
return {
\ 'command': ale#Escape(l:executable)
\ . ' lint'
\ . (empty(l:options) ? '' : ' ' . l:options),
\ . ale#Pad(ale#Var(a:buffer, 'toml_tombi_lint_options')),
\}
endfunction