]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Test fail with older Vim versions
authorYegappan Lakshmanan <yegappan@yahoo.com>
Thu, 6 Jul 2023 14:54:31 +0000 (07:54 -0700)
committerYegappan Lakshmanan <yegappan@yahoo.com>
Thu, 6 Jul 2023 14:54:31 +0000 (07:54 -0700)
autoload/lsp/options.vim

index 96ba5c870f8f4a9459adb0cfc57a414966561a7e..5a787e8206387e7412a4302dce6fb20d6ef49043 100644 (file)
@@ -1,5 +1,9 @@
 vim9script
 
+export const COMPLETIONMATCHER_CASE = 1
+export const COMPLETIONMATCHER_ICASE = 2
+export const COMPLETIONMATCHER_FUZZY = 3
+
 # LSP plugin options
 # User can override these by calling the OptionsSet() function.
 export var lspOptions: dict<any> = {
@@ -19,6 +23,9 @@ export var lspOptions: dict<any> = {
   # icase | fuzzy | case match for language servers that replies with a full
   # list of completion items
   completionMatcher: 'case',
+  # Due to a bug in the earlier versions of Vim, cannot use the
+  # COMPLETIONMATCHER_CASE constant here for initialization.
+  completionMatcherValue: 1,
   # diagnostics signs options
   diagSignErrorText: 'E>',
   diagSignHintText: 'H>',
@@ -87,12 +94,6 @@ export var lspOptions: dict<any> = {
   completionKinds: {}
 }
 
-export const COMPLETIONMATCHER_CASE = 1
-export const COMPLETIONMATCHER_ICASE = 2
-export const COMPLETIONMATCHER_FUZZY = 3
-
-lspOptions.completionMatcherValue = COMPLETIONMATCHER_CASE
-
 # set the LSP plugin options from the user provided option values
 export def OptionsSet(opts: dict<any>)
   lspOptions->extend(opts)