diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2019-12-15 16:15:57 +0900 |
---|---|---|
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2019-12-15 16:15:57 +0900 |
commit | d93ca7e89884bc5f8656a60460e5f743810a2cb3 (patch) | |
tree | f5f0cc54928aee896be27b4c9415fe6a0d21c5ad /autoload | |
parent | c552d6fdc0104ac77ccf09ef8e3db9d5b51b2f87 (diff) | |
download | vim-lsp-settings-d93ca7e89884bc5f8656a60460e5f743810a2cb3.tar.gz vim-lsp-settings-d93ca7e89884bc5f8656a60460e5f743810a2cb3.tar.bz2 vim-lsp-settings-d93ca7e89884bc5f8656a60460e5f743810a2cb3.zip |
Customizable
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/lsp_settings.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/autoload/lsp_settings.vim b/autoload/lsp_settings.vim new file mode 100644 index 0000000..e3ce81b --- /dev/null +++ b/autoload/lsp_settings.vim @@ -0,0 +1,11 @@ +function! lsp_settings#get(name, key, default) abort + let l:config = get(g:, 'lsp_settings', {}) + if !has_key(l:config, a:name) + return a:default + endif + let l:config = l:config[a:name] + if !has_key(l:config, a:key) + return a:default + endif + return l:config[a:key] +endfunction |