]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Error loading the plugin if OptionsSet() function is not used
authorYegappan Lakshmanan <yegappan@yahoo.com>
Thu, 6 Jul 2023 14:21:20 +0000 (07:21 -0700)
committerYegappan Lakshmanan <yegappan@yahoo.com>
Thu, 6 Jul 2023 14:21:20 +0000 (07:21 -0700)
autoload/lsp/options.vim

index b8fbb95ec720ba196d2565fce13b0033494770c8..96ba5c870f8f4a9459adb0cfc57a414966561a7e 100644 (file)
@@ -91,6 +91,8 @@ 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)
@@ -103,11 +105,12 @@ export def OptionsSet(opts: dict<any>)
 
   # For faster comparison, convert the 'completionMatcher' option value from a
   # string to a number.
-  lspOptions.completionMatcherValue = COMPLETIONMATCHER_CASE
   if lspOptions.completionMatcher == 'icase'
     lspOptions.completionMatcherValue = COMPLETIONMATCHER_ICASE
   elseif lspOptions.completionMatcher == 'fuzzy'
     lspOptions.completionMatcherValue = COMPLETIONMATCHER_FUZZY
+  else
+    lspOptions.completionMatcherValue = COMPLETIONMATCHER_CASE
   endif
 enddef