From 6cbffceb6130747f38cf86bdcec8aca8fdfed83f Mon Sep 17 00:00:00 2001 From: Yegappan Lakshmanan Date: Thu, 6 Jul 2023 07:54:31 -0700 Subject: [PATCH] Test fail with older Vim versions --- autoload/lsp/options.vim | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/autoload/lsp/options.vim b/autoload/lsp/options.vim index 96ba5c8..5a787e8 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 @@ export var lspOptions: dict = { # 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 = { 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) lspOptions->extend(opts) -- 2.48.1