From a8b41bb19784425d43a9810d877c27058cb0c8e1 Mon Sep 17 00:00:00 2001 From: Yegappan Lakshmanan Date: Thu, 6 Jul 2023 07:21:20 -0700 Subject: [PATCH] Error loading the plugin if OptionsSet() function is not used --- autoload/lsp/options.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autoload/lsp/options.vim b/autoload/lsp/options.vim index b8fbb95..96ba5c8 100644 --- a/autoload/lsp/options.vim +++ b/autoload/lsp/options.vim @@ -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) lspOptions->extend(opts) @@ -103,11 +105,12 @@ export def OptionsSet(opts: dict) # 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 -- 2.48.1