autoload/lsp/options.vim | 13 +++++++------ diff --git a/autoload/lsp/options.vim b/autoload/lsp/options.vim index 96ba5c870f8f4a9459adb0cfc57a414966561a7e..5a787e8206387e7412a4302dce6fb20d6ef49043 100644 --- a/autoload/lsp/options.vim +++ b/autoload/lsp/options.vim @@ -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 = { @@ -19,6 +23,9 @@ autoPopulateDiags: false, # 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>', @@ -86,12 +93,6 @@ customCompletionKinds: false, # A dictionary with all completion kinds that you want to customize 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)