]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
adding 'OptionsGet' func
authorshane.xb.qian <shane.qian@foxmail.com>
Mon, 14 Nov 2022 04:43:53 +0000 (12:43 +0800)
committershane.xb.qian <shane.qian@foxmail.com>
Tue, 15 Nov 2022 05:58:50 +0000 (13:58 +0800)
autoload/lsp/options.vim
plugin/lsp.vim

index 35dd4af7780401e716e7612df738c38883f1da5d..fd8cbaa491baabbcb7e41b060403a077c3f5dbd9 100644 (file)
@@ -49,4 +49,9 @@ export def OptionsSet(opts: dict<any>)
   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
index 4e06d0f385e927d6ee5d4681d235c30075f8c447..98fad20691e9ef049960707f274e2ad69e69f04f 100644 (file)
@@ -14,6 +14,10 @@ def g:LspOptionsSet(opts: dict<any>)
   options.OptionsSet(opts)
 enddef
 
+def g:LspOptionsGet(key: string): any
+  return options.OptionsGet(key)
+enddef
+
 def g:LspAddServer(serverList: list<dict<any>>)
   lsp.AddServer(serverList)
 enddef