diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-02-22 00:45:37 +0900 |
---|---|---|
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-02-22 00:45:37 +0900 |
commit | 3e48c84109192369bf509b7352c05b58d703768a (patch) | |
tree | 71382f33b5915001d592a3ec60d6d6fe7082bca1 | |
parent | 8b850cbdd6d5e821f2815d4f81c35bd91b5ded28 (diff) | |
download | vim-lsp-settings-3e48c84109192369bf509b7352c05b58d703768a.tar.gz vim-lsp-settings-3e48c84109192369bf509b7352c05b58d703768a.tar.bz2 vim-lsp-settings-3e48c84109192369bf509b7352c05b58d703768a.zip |
Merge settings
-rw-r--r-- | autoload/lsp_settings/profile.vim | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/autoload/lsp_settings/profile.vim b/autoload/lsp_settings/profile.vim index 4fd9315..771eef0 100644 --- a/autoload/lsp_settings/profile.vim +++ b/autoload/lsp_settings/profile.vim @@ -4,7 +4,13 @@ function! lsp_settings#profile#load_local() abort if !empty(l:root) && filereadable(l:root . '/settings.json') let l:settings = json_decode(join(readfile(l:root . '/settings.json'), "\n")) if has_key(g:, 'lsp_settings') - let g:lsp_settings = extend(g:lsp_settings, l:settings) + for [l:k, l:v] in items(l:settings) + if has_key(g:lsp_settings, l:k) + let g:lsp_settings[l:k] = extend(g:lsp_settings[l:k], l:v) + else + let g:lsp_settings[l:k] = l:v + endif + endfor else let g:lsp_settings = l:settings endif |