diff options
-rw-r--r-- | autoload/lsp_settings.vim | 4 | ||||
-rw-r--r-- | settings/json-languageserver.vim | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/autoload/lsp_settings.vim b/autoload/lsp_settings.vim index 60d29d3..fbe3210 100644 --- a/autoload/lsp_settings.vim +++ b/autoload/lsp_settings.vim @@ -5,7 +5,7 @@ function! lsp_settings#get(name, key, default) abort if !has_key(l:config, a:name) if !has_key(l:config, '*') if type(a:default) ==# v:t_func - return a:default() + return a:default(a:name, a:key) endif return a:default endif @@ -15,7 +15,7 @@ function! lsp_settings#get(name, key, default) abort endif if !has_key(l:config, a:key) if type(a:default) ==# v:t_func - return a:default() + return a:default(a:name, a:key) endif return a:default endif diff --git a/settings/json-languageserver.vim b/settings/json-languageserver.vim index c7ad3ae..b233342 100644 --- a/settings/json-languageserver.vim +++ b/settings/json-languageserver.vim @@ -8,6 +8,6 @@ augroup vimlsp_settings_json_languageserver \ 'whitelist': lsp_settings#get('json-languageserver', 'whitelist', ['json']), \ 'blacklist': lsp_settings#get('json-languageserver', 'blacklist', []), \ 'config': lsp_settings#get('json-languageserver', 'config', {}), - \ 'workspace_config': lsp_settings#get('json-languageserver', 'workspace_config', {->{'json': {'format': {'enable': v:true}, 'schemas': json_decode(join(readfile(expand('<sfile>:h:h') . '/data/catalog.json'), "\n"))['schemas']}}}), + \ 'workspace_config': lsp_settings#get('json-languageserver', 'workspace_config', {name, key->{'json': {'format': {'enable': v:true}, 'schemas': json_decode(join(readfile(expand('<sfile>:h:h') . '/data/catalog.json'), "\n"))['schemas']}}}), \ } augroup END |