autoload/lsp/options.vim | 5 +++++ plugin/lsp.vim | 4 ++++ diff --git a/autoload/lsp/options.vim b/autoload/lsp/options.vim index 35dd4af7780401e716e7612df738c38883f1da5d..fd8cbaa491baabbcb7e41b060403a077c3f5dbd9 100644 --- a/autoload/lsp/options.vim +++ b/autoload/lsp/options.vim @@ -49,4 +49,9 @@ lspOptions[key] = opts[key] endfor enddef +# get LSP option value per user provided key +export def OptionsGet(key: string): any + return lspOptions[key] +enddef + # vim: tabstop=8 shiftwidth=2 softtabstop=2 diff --git a/plugin/lsp.vim b/plugin/lsp.vim index 4e06d0f385e927d6ee5d4681d235c30075f8c447..98fad20691e9ef049960707f274e2ad69e69f04f 100644 --- a/plugin/lsp.vim +++ b/plugin/lsp.vim @@ -14,6 +14,10 @@ def g:LspOptionsSet(opts: dict) options.OptionsSet(opts) enddef +def g:LspOptionsGet(key: string): any + return options.OptionsGet(key) +enddef + def g:LspAddServer(serverList: list>) lsp.AddServer(serverList) enddef