completionKinds: {}
}
+export const COMPLETIONMATCHER_CASE = 1
+export const COMPLETIONMATCHER_ICASE = 2
+export const COMPLETIONMATCHER_FUZZY = 3
+
# set the LSP plugin options from the user provided option values
export def OptionsSet(opts: dict<any>)
lspOptions->extend(opts)
if !has('patch-9.0.1157')
lspOptions.showDiagWithVirtualText = false
endif
+
+ # 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
+ endif
enddef
# return a copy of the LSP plugin options