diff options
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/lsp_settings.vim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/autoload/lsp_settings.vim b/autoload/lsp_settings.vim index 08a8b3e..60d29d3 100644 --- a/autoload/lsp_settings.vim +++ b/autoload/lsp_settings.vim @@ -4,6 +4,9 @@ function! lsp_settings#get(name, key, default) abort let l:config = get(g:, 'lsp_settings', {}) if !has_key(l:config, a:name) if !has_key(l:config, '*') + if type(a:default) ==# v:t_func + return a:default() + endif return a:default endif let l:config = l:config['*'] @@ -11,6 +14,9 @@ function! lsp_settings#get(name, key, default) abort let l:config = l:config[a:name] endif if !has_key(l:config, a:key) + if type(a:default) ==# v:t_func + return a:default() + endif return a:default endif return l:config[a:key] |