]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
return entire lsp options instead of specific one
authorshane.xb.qian <shane.qian@foxmail.com>
Tue, 15 Nov 2022 06:20:22 +0000 (14:20 +0800)
committershane.xb.qian <shane.qian@foxmail.com>
Tue, 15 Nov 2022 06:20:22 +0000 (14:20 +0800)
autoload/lsp/options.vim
doc/lsp.txt
plugin/lsp.vim

index fd8cbaa491baabbcb7e41b060403a077c3f5dbd9..f1605f7252629d96656e1ec9f2e3071df4195f99 100644 (file)
@@ -49,9 +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]
+# get LSP options
+export def OptionsGet(): dict<any>
+  return lspOptions
 enddef
 
 # vim: tabstop=8 shiftwidth=2 softtabstop=2
index 923edbbae37e1d4402c6fa753125e49c8fa6849f..b7d6e86526f0ea7ac81c06d1f7dabc96947f0112 100644 (file)
@@ -285,8 +285,10 @@ diagnostic messages, you can add the following line to your .vimrc file:
 
 And to get or check one option value via its key you can query like following:
 >
-       echo LspOptionsGet('autoHighlightDiags')
+       echo LspOptionsGet()['autoHighlightDiags']
 <
+Or if no specific key but just LspOptionsGet() then to get all options.
+
 ==============================================================================
 5. Commands                                            *lsp-commands*
 
index 98fad20691e9ef049960707f274e2ad69e69f04f..163b5291dfe3f43992fc33b75a8b335bfdb195ed 100644 (file)
@@ -14,8 +14,8 @@ def g:LspOptionsSet(opts: dict<any>)
   options.OptionsSet(opts)
 enddef
 
-def g:LspOptionsGet(key: string): any
-  return options.OptionsGet(key)
+def g:LspOptionsGet(): dict<any>
+  return options.OptionsGet()
 enddef
 
 def g:LspAddServer(serverList: list<dict<any>>)