From: Yegappan Lakshmanan Date: Thu, 6 Jul 2023 14:54:31 +0000 (-0700) Subject: Test fail with older Vim versions X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=6cbffceb6130747f38cf86bdcec8aca8fdfed83f;p=vim-lsp.git Test fail with older Vim versions --- 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)