summaryrefslogtreecommitdiff
path: root/autoload/ale.vim
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/ale.vim')
-rw-r--r--autoload/ale.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/autoload/ale.vim b/autoload/ale.vim
index ee32a9a6..51c0ce83 100644
--- a/autoload/ale.vim
+++ b/autoload/ale.vim
@@ -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_'.