fix: invalid character in group name 0.7 neovim version (#18)
This commit is contained in:
@@ -198,104 +198,109 @@ hl.plugins.treesitter = {
|
|||||||
commentTSDanger = hl.predef.RedItalic,
|
commentTSDanger = hl.predef.RedItalic,
|
||||||
commentTSNote = hl.predef.BlueItalic,
|
commentTSNote = hl.predef.BlueItalic,
|
||||||
commentTSWarning = hl.predef.YellowItalic,
|
commentTSWarning = hl.predef.YellowItalic,
|
||||||
["@comment"] = { link = "Comment" },
|
|
||||||
["@error"] = { link = "Error" },
|
|
||||||
["@none"] = { bg = "NONE", fg = "NONE" },
|
|
||||||
["@preproc"] = { link = "PreProc" },
|
|
||||||
["@define"] = { link = "Define" },
|
|
||||||
["@operator"] = { link = "Operator" },
|
|
||||||
["@punctuation.delimiter"] = { link = "Delimiter" },
|
|
||||||
["@punctuation.bracket"] = { link = "Delimiter" },
|
|
||||||
["@punctuation.special"] = { link = "Delimiter" },
|
|
||||||
["@string"] = { link = "String" },
|
|
||||||
["@string.regex"] = { link = "String" },
|
|
||||||
["@string.escape"] = { link = "SpecialChar" },
|
|
||||||
["@string.special"] = { link = "SpecialChar" },
|
|
||||||
["@character"] = { link = "Character" },
|
|
||||||
["@character.special"] = { link = "SpecialChar" },
|
|
||||||
["@boolean"] = { link = "Boolean" },
|
|
||||||
["@number"] = { link = "Number" },
|
|
||||||
["@float"] = { link = "Float" },
|
|
||||||
["@function"] = { link = "Function" },
|
|
||||||
["@function.call"] = { link = "Function" },
|
|
||||||
["@function.builtin"] = { link = "Special" },
|
|
||||||
["@function.macro"] = { link = "Macro" },
|
|
||||||
["@method"] = { link = "Function" },
|
|
||||||
["@method.call"] = { link = "Function" },
|
|
||||||
["@constructor"] = { link = "Special" },
|
|
||||||
["@parameter"] = { link = "Identifier" },
|
|
||||||
["@keyword"] = { link = "Keyword" },
|
|
||||||
["@keyword.function"] = { link = "Keyword" },
|
|
||||||
["@keyword.operator"] = { link = "Keyword" },
|
|
||||||
["@keyword.return"] = { link = "Keyword" },
|
|
||||||
["@conditional"] = { link = "Conditional" },
|
|
||||||
["@repeat"] = { link = "Repeat" },
|
|
||||||
["@debug"] = { link = "Debug" },
|
|
||||||
["@label"] = { link = "Label" },
|
|
||||||
["@include"] = { link = "Include" },
|
|
||||||
["@exception"] = { link = "Exception" },
|
|
||||||
["@type"] = { link = "Type" },
|
|
||||||
["@type.builtin"] = { link = "Type" },
|
|
||||||
["@type.qualifier"] = { link = "Type" },
|
|
||||||
["@type.definition"] = { link = "Typedef" },
|
|
||||||
["@storageclass"] = { link = "StorageClass" },
|
|
||||||
["@attribute"] = { link = "PreProc" },
|
|
||||||
["@field"] = { link = "Identifier" },
|
|
||||||
["@property"] = { link = "Function" },
|
|
||||||
["@variable"] = { link = "Normal" },
|
|
||||||
["@variable.builtin"] = { link = "Special" },
|
|
||||||
["@constant"] = { link = "Constant" },
|
|
||||||
["@constant.builtin"] = { link = "Special" },
|
|
||||||
["@constant.macro"] = { link = "Define" },
|
|
||||||
["@namespace"] = { link = "Include" },
|
|
||||||
["@symbol"] = { link = "Identifier" },
|
|
||||||
["@text"] = { link = "Normal" },
|
|
||||||
["@text.strong"] = { bold = true },
|
|
||||||
["@text.emphasis"] = { italic = true },
|
|
||||||
["@text.underline"] = { underline = true },
|
|
||||||
["@text.strike"] = { strikethrough = true },
|
|
||||||
["@text.title"] = { link = "Title" },
|
|
||||||
["@text.literal"] = { link = "String" },
|
|
||||||
["@text.uri"] = { link = "Underlined" },
|
|
||||||
["@text.math"] = { link = "Special" },
|
|
||||||
["@text.environment"] = { link = "Macro" },
|
|
||||||
["@text.environment.name"] = { link = "Type" },
|
|
||||||
["@text.reference"] = { link = "Constant" },
|
|
||||||
["@text.todo"] = { link = "Todo" },
|
|
||||||
["@text.note"] = hl.predef.BlueItalic,
|
|
||||||
["@text.warning"] = hl.predef.YellowItalic,
|
|
||||||
["@text.danger"] = hl.predef.RedItalic,
|
|
||||||
["@tag"] = { link = "Tag" },
|
|
||||||
["@tag.attribute"] = { link = "Identifier" },
|
|
||||||
["@tag.delimiter"] = { link = "Delimiter" },
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hl.plugins.cmp = {
|
if u.check_min_version(0, 8, 0) then
|
||||||
LspNamespace = { link = "@namespace" },
|
hl.plugins.treesitter = {
|
||||||
LspType = { link = "@type" },
|
["@comment"] = { link = "Comment" },
|
||||||
LspClass = { link = "@type" },
|
["@error"] = { link = "Error" },
|
||||||
LspEnum = { link = "@constant" },
|
["@none"] = { bg = "NONE", fg = "NONE" },
|
||||||
LspInterface = { link = "@constant" },
|
["@preproc"] = { link = "PreProc" },
|
||||||
LspStruct = { link = "@constant" },
|
["@define"] = { link = "Define" },
|
||||||
LspTypeParameter = { link = "@type" },
|
["@operator"] = { link = "Operator" },
|
||||||
LspParameter = { link = "@parameter" },
|
["@punctuation.delimiter"] = { link = "Delimiter" },
|
||||||
LspVariable = { link = "@variable" },
|
["@punctuation.bracket"] = { link = "Delimiter" },
|
||||||
LspProperty = { link = "@property" },
|
["@punctuation.special"] = { link = "Delimiter" },
|
||||||
LspEnumMember = { link = "@constant" },
|
["@string"] = { link = "String" },
|
||||||
LspEvent = { link = "@constant" },
|
["@string.regex"] = { link = "String" },
|
||||||
LspFunction = { link = "@function" },
|
["@string.escape"] = { link = "SpecialChar" },
|
||||||
LspMethod = { link = "@method" },
|
["@string.special"] = { link = "SpecialChar" },
|
||||||
LspMacro = { link = "@constant.macro" },
|
["@character"] = { link = "Character" },
|
||||||
LspKeyword = { link = "@keyword" },
|
["@character.special"] = { link = "SpecialChar" },
|
||||||
LspModifier = { link = "TSModifier" },
|
["@boolean"] = { link = "Boolean" },
|
||||||
LspComment = { link = "@comment" },
|
["@number"] = { link = "Number" },
|
||||||
LspString = { link = "@string" },
|
["@float"] = { link = "Float" },
|
||||||
LspNumber = { link = "@number" },
|
["@function"] = { link = "Function" },
|
||||||
LspRegexp = { link = "@string.regex" },
|
["@function.call"] = { link = "Function" },
|
||||||
LspOperator = { link = "@operator" },
|
["@function.builtin"] = { link = "Special" },
|
||||||
LspDecorator = { link = "@symbol" },
|
["@function.macro"] = { link = "Macro" },
|
||||||
LspDeprecated = { link = "@text.strike" },
|
["@method"] = { link = "Function" },
|
||||||
}
|
["@method.call"] = { link = "Function" },
|
||||||
|
["@constructor"] = { link = "Special" },
|
||||||
|
["@parameter"] = { link = "Identifier" },
|
||||||
|
["@keyword"] = { link = "Keyword" },
|
||||||
|
["@keyword.function"] = { link = "Keyword" },
|
||||||
|
["@keyword.operator"] = { link = "Keyword" },
|
||||||
|
["@keyword.return"] = { link = "Keyword" },
|
||||||
|
["@conditional"] = { link = "Conditional" },
|
||||||
|
["@repeat"] = { link = "Repeat" },
|
||||||
|
["@debug"] = { link = "Debug" },
|
||||||
|
["@label"] = { link = "Label" },
|
||||||
|
["@include"] = { link = "Include" },
|
||||||
|
["@exception"] = { link = "Exception" },
|
||||||
|
["@type"] = { link = "Type" },
|
||||||
|
["@type.builtin"] = { link = "Type" },
|
||||||
|
["@type.qualifier"] = { link = "Type" },
|
||||||
|
["@type.definition"] = { link = "Typedef" },
|
||||||
|
["@storageclass"] = { link = "StorageClass" },
|
||||||
|
["@attribute"] = { link = "PreProc" },
|
||||||
|
["@field"] = { link = "Identifier" },
|
||||||
|
["@property"] = { link = "Function" },
|
||||||
|
["@variable"] = { link = "Normal" },
|
||||||
|
["@variable.builtin"] = { link = "Special" },
|
||||||
|
["@constant"] = { link = "Constant" },
|
||||||
|
["@constant.builtin"] = { link = "Special" },
|
||||||
|
["@constant.macro"] = { link = "Define" },
|
||||||
|
["@namespace"] = { link = "Include" },
|
||||||
|
["@symbol"] = { link = "Identifier" },
|
||||||
|
["@text"] = { link = "Normal" },
|
||||||
|
["@text.strong"] = { bold = true },
|
||||||
|
["@text.emphasis"] = { italic = true },
|
||||||
|
["@text.underline"] = { underline = true },
|
||||||
|
["@text.strike"] = { strikethrough = true },
|
||||||
|
["@text.title"] = { link = "Title" },
|
||||||
|
["@text.literal"] = { link = "String" },
|
||||||
|
["@text.uri"] = { link = "Underlined" },
|
||||||
|
["@text.math"] = { link = "Special" },
|
||||||
|
["@text.environment"] = { link = "Macro" },
|
||||||
|
["@text.environment.name"] = { link = "Type" },
|
||||||
|
["@text.reference"] = { link = "Constant" },
|
||||||
|
["@text.todo"] = { link = "Todo" },
|
||||||
|
["@text.note"] = hl.predef.BlueItalic,
|
||||||
|
["@text.warning"] = hl.predef.YellowItalic,
|
||||||
|
["@text.danger"] = hl.predef.RedItalic,
|
||||||
|
["@tag"] = { link = "Tag" },
|
||||||
|
["@tag.attribute"] = { link = "Identifier" },
|
||||||
|
["@tag.delimiter"] = { link = "Delimiter" },
|
||||||
|
}
|
||||||
|
|
||||||
|
hl.plugins.lsp_semantic_tokens = {
|
||||||
|
LspNamespace = { link = "@namespace" },
|
||||||
|
LspType = { link = "@type" },
|
||||||
|
LspClass = { link = "@type" },
|
||||||
|
LspEnum = { link = "@constant" },
|
||||||
|
LspInterface = { link = "@constant" },
|
||||||
|
LspStruct = { link = "@constant" },
|
||||||
|
LspTypeParameter = { link = "@type" },
|
||||||
|
LspParameter = { link = "@parameter" },
|
||||||
|
LspVariable = { link = "@variable" },
|
||||||
|
LspProperty = { link = "@property" },
|
||||||
|
LspEnumMember = { link = "@constant" },
|
||||||
|
LspEvent = { link = "@constant" },
|
||||||
|
LspFunction = { link = "@function" },
|
||||||
|
LspMethod = { link = "@method" },
|
||||||
|
LspMacro = { link = "@constant.macro" },
|
||||||
|
LspKeyword = { link = "@keyword" },
|
||||||
|
LspModifier = { link = "TSModifier" },
|
||||||
|
LspComment = { link = "@comment" },
|
||||||
|
LspString = { link = "@string" },
|
||||||
|
LspNumber = { link = "@number" },
|
||||||
|
LspRegexp = { link = "@string.regex" },
|
||||||
|
LspOperator = { link = "@operator" },
|
||||||
|
LspDecorator = { link = "@symbol" },
|
||||||
|
LspDeprecated = { link = "@text.strike" },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
hl.plugins.cmp = {
|
hl.plugins.cmp = {
|
||||||
CmpItemKindDefault = { fg = p.blue, bg = p.none },
|
CmpItemKindDefault = { fg = p.blue, bg = p.none },
|
||||||
|
|||||||
@@ -38,4 +38,19 @@ function U.color_gamma(hex, gamma)
|
|||||||
return string.format("#%02x%02x%02x", r, g, b)
|
return string.format("#%02x%02x%02x", r, g, b)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function U.check_min_version(major, minor, patch)
|
||||||
|
local version = vim.version()
|
||||||
|
local current_major = version.major
|
||||||
|
local current_minor = version.minor
|
||||||
|
local current_patch = version.patch
|
||||||
|
if current_major > major then
|
||||||
|
return true
|
||||||
|
elseif current_major == major and current_minor > minor then
|
||||||
|
return true
|
||||||
|
elseif current_major == major and current_minor == minor and current_patch >= patch then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
return U
|
return U
|
||||||
|
|||||||
Reference in New Issue
Block a user