Simplify the code for most linters and tests with closures

This commit is contained in:
w0rp
2018-08-02 23:44:12 +01:00
parent 9ef266d050
commit 217284360d
102 changed files with 631 additions and 1232 deletions
+5
View File
@@ -197,6 +197,11 @@ function! ale#Var(buffer, variable_name) abort
return get(l:vars, l:full_name, g:[l:full_name])
endfunction
" As above, but curry the arguments so only the buffer number is required.
function! ale#VarFunc(variable_name) abort
return {buf -> ale#Var(buf, a:variable_name)}
endfunction
" Initialize a variable with a default value, if it isn't already set.
"
" Every variable name will be prefixed with 'ale_'.