Update to nvim >= 0.8.0: Remove TS* and use @x.y groups instead (#10)
This commit is contained in:
parent
b1b49437dc
commit
2a4abe831f
|
@ -48,7 +48,8 @@ local hsl = lush.hsl
|
||||||
-- LSP/Linters mistakenly show `undefined global` errors in the spec, they may
|
-- LSP/Linters mistakenly show `undefined global` errors in the spec, they may
|
||||||
-- support an annotation like the following. Consult your server documentation.
|
-- support an annotation like the following. Consult your server documentation.
|
||||||
---@diagnostic disable: undefined-global
|
---@diagnostic disable: undefined-global
|
||||||
local theme = lush(function()
|
local theme = lush(function(injected_functions)
|
||||||
|
local sym = injected_functions.sym
|
||||||
return {
|
return {
|
||||||
-- The following are the Neovim (as of 0.8.0-dev+100-g371dfb174) highlight
|
-- The following are the Neovim (as of 0.8.0-dev+100-g371dfb174) highlight
|
||||||
-- groups, mostly used for styling UI elements.
|
-- groups, mostly used for styling UI elements.
|
||||||
|
@ -205,77 +206,56 @@ local theme = lush(function()
|
||||||
-- DiagnosticSignInfo { } , -- Used for "Info" signs in sign column.
|
-- DiagnosticSignInfo { } , -- Used for "Info" signs in sign column.
|
||||||
-- DiagnosticSignHint { } , -- Used for "Hint" signs in sign column.
|
-- DiagnosticSignHint { } , -- Used for "Hint" signs in sign column.
|
||||||
|
|
||||||
-- Tree-Sitter syntax groups. Most link to corresponding
|
-- Tree-Sitter syntax groups.
|
||||||
-- vim syntax groups (e.g. TSKeyword => Keyword) by default.
|
|
||||||
--
|
--
|
||||||
-- See :h nvim-treesitter-highlights, some groups may not be listed, submit a PR fix to lush-template!
|
-- See :h treesitter-highlight-groups, some groups may not be listed, submit a PR fix to lush-template!
|
||||||
--
|
-- the sym function below is from: https://github.com/rktjmp/lush.nvim/issues/109
|
||||||
-- TSAttribute { } , -- Annotations that can be attached to the code to denote some kind of meta information. e.g. C++/Dart attributes.
|
|
||||||
-- TSBoolean { } , -- Boolean literals: `True` and `False` in Python.
|
-- sym('@text.literal')({}), -- Comment
|
||||||
-- TSCharacter { } , -- Character literals: `'a'` in C.
|
-- sym('@text.reference')({}), -- Identifier
|
||||||
-- TSCharacterSpecial { } , -- Special characters.
|
-- sym('@text.title')({}), -- Title
|
||||||
-- TSComment { } , -- Line comments and block comments.
|
-- sym('@text.uri')({}), -- Underlined
|
||||||
-- TSConditional { } , -- Keywords related to conditionals: `if`, `when`, `cond`, etc.
|
-- sym('@text.underline')({}), -- Underlined
|
||||||
-- TSConstant { } , -- Constants identifiers. These might not be semantically constant. E.g. uppercase variables in Python.
|
-- sym('@text.todo')({}), -- Todo
|
||||||
-- TSConstBuiltin { } , -- Built-in constant values: `nil` in Lua.
|
-- sym('@comment')({}), -- Comment
|
||||||
-- TSConstMacro { } , -- Constants defined by macros: `NULL` in C.
|
-- sym('@punctuation')({}), -- Delimiter
|
||||||
-- TSConstructor { } , -- Constructor calls and definitions: `{}` in Lua, and Java constructors.
|
-- sym('@constant')({}), -- Constant
|
||||||
-- TSDebug { } , -- Debugging statements.
|
-- sym('@constant.builtin')({}), -- Special
|
||||||
-- TSDefine { } , -- Preprocessor #define statements.
|
-- sym('@constant.macro')({}), -- Define
|
||||||
-- TSError { } , -- Syntax/parser errors. This might highlight large sections of code while the user is typing still incomplete code, use a sensible highlight.
|
-- sym('@define')({}), -- Define
|
||||||
-- TSException { } , -- Exception related keywords: `try`, `except`, `finally` in Python.
|
-- sym('@macro')({}), -- Macro
|
||||||
-- TSField { } , -- Object and struct fields.
|
-- sym('@string')({}), -- String
|
||||||
-- TSFloat { } , -- Floating-point number literals.
|
-- sym('@string.escape')({}), -- SpecialChar
|
||||||
-- TSFunction { } , -- Function calls and definitions.
|
-- sym('@string.special')({}), -- SpecialChar
|
||||||
-- TSFuncBuiltin { } , -- Built-in functions: `print` in Lua.
|
-- sym('@character')({}), -- Character
|
||||||
-- TSFuncMacro { } , -- Macro defined functions (calls and definitions): each `macro_rules` in Rust.
|
-- sym('@character.special')({}), -- SpecialChar
|
||||||
-- TSInclude { } , -- File or module inclusion keywords: `#include` in C, `use` or `extern crate` in Rust.
|
-- sym('@number')({}), -- Number
|
||||||
-- TSKeyword { } , -- Keywords that don't fit into other categories.
|
-- sym('@boolean')({}), -- Boolean
|
||||||
-- TSKeywordFunction { } , -- Keywords used to define a function: `function` in Lua, `def` and `lambda` in Python.
|
-- sym('@float')({}), -- Float
|
||||||
-- TSKeywordOperator { } , -- Unary and binary operators that are English words: `and`, `or` in Python; `sizeof` in C.
|
-- sym('@function')({}), -- Function
|
||||||
-- TSKeywordReturn { } , -- Keywords like `return` and `yield`.
|
-- sym('@function.builtin')({}), -- Special
|
||||||
-- TSLabel { } , -- GOTO labels: `label:` in C, and `::label::` in Lua.
|
-- sym('@function.macro')({}), -- Macro
|
||||||
-- TSMethod { } , -- Method calls and definitions.
|
-- sym('@parameter')({}), -- Identifier
|
||||||
-- TSNamespace { } , -- Identifiers referring to modules and namespaces.
|
-- sym('@method')({}), -- Function
|
||||||
-- TSNone { } , -- No highlighting (sets all highlight arguments to `NONE`). this group is used to clear certain ranges, for example, string interpolations. Don't change the values of this highlight group.
|
-- sym('@field')({}), -- Identifier
|
||||||
-- TSNumber { } , -- Numeric literals that don't fit into other categories.
|
-- sym('@property')({}), -- Identifier
|
||||||
-- TSOperator { } , -- Binary or unary operators: `+`, and also `->` and `*` in C.
|
-- sym('@constructor')({}), -- Special
|
||||||
-- TSParameter { } , -- Parameters of a function.
|
-- sym('@conditional')({}), -- Conditional
|
||||||
-- TSParameterReference { } , -- References to parameters of a function.
|
-- sym('@repeat')({}), -- Repeat
|
||||||
-- TSPreProc { } , -- Preprocessor #if, #else, #endif, etc.
|
-- sym('@label')({}), -- Label
|
||||||
-- TSProperty { } , -- Same as `TSField`.
|
-- sym('@operator')({}), -- Operator
|
||||||
-- TSPunctDelimiter { } , -- Punctuation delimiters: Periods, commas, semicolons, etc.
|
-- sym('@keyword')({}), -- Keyword
|
||||||
-- TSPunctBracket { } , -- Brackets, braces, parentheses, etc.
|
-- sym('@exception')({}), -- Exception
|
||||||
-- TSPunctSpecial { } , -- Special punctuation that doesn't fit into the previous categories.
|
-- sym('@variable')({}), -- Identifier
|
||||||
-- TSRepeat { } , -- Keywords related to loops: `for`, `while`, etc.
|
-- sym('@type')({}), -- Type
|
||||||
-- TSStorageClass { } , -- Keywords that affect how a variable is stored: `static`, `comptime`, `extern`, etc.
|
-- sym('@type.definition')({}), -- Typedef
|
||||||
-- TSString { } , -- String literals.
|
-- sym('@storageclass')({}), -- StorageClass
|
||||||
-- TSStringRegex { } , -- Regular expression literals.
|
-- sym('@structure')({}), -- Structure
|
||||||
-- TSStringEscape { } , -- Escape characters within a string: `\n`, `\t`, etc.
|
-- sym('@namespace')({}), -- Identifier
|
||||||
-- TSStringSpecial { } , -- Strings with special meaning that don't fit into the previous categories.
|
-- sym('@include')({}), -- Include
|
||||||
-- TSSymbol { } , -- Identifiers referring to symbols or atoms.
|
-- sym('@preproc')({}), -- PreProc
|
||||||
-- TSTag { } , -- Tags like HTML tag names.
|
-- sym('@debug')({}), -- Debug
|
||||||
-- TSTagAttribute { } , -- HTML tag attributes.
|
-- sym('@tag')({}), -- Tag
|
||||||
-- TSTagDelimiter { } , -- Tag delimiters like `<` `>` `/`.
|
|
||||||
-- TSText { } , -- Non-structured text. Like text in a markup language.
|
|
||||||
-- TSStrong { } , -- Text to be represented in bold.
|
|
||||||
-- TSEmphasis { } , -- Text to be represented with emphasis.
|
|
||||||
-- TSUnderline { } , -- Text to be represented with an underline.
|
|
||||||
-- TSStrike { } , -- Strikethrough text.
|
|
||||||
-- TSTitle { } , -- Text that is part of a title.
|
|
||||||
-- TSLiteral { } , -- Literal or verbatim text.
|
|
||||||
-- TSURI { } , -- URIs like hyperlinks or email addresses.
|
|
||||||
-- TSMath { } , -- Math environments like LaTeX's `$ ... $`
|
|
||||||
-- TSTextReference { } , -- Footnotes, text references, citations, etc.
|
|
||||||
-- TSEnvironment { } , -- Text environments of markup languages.
|
|
||||||
-- TSEnvironmentName { } , -- Text/string indicating the type of text environment. Like the name of a `\begin` block in LaTeX.
|
|
||||||
-- TSNote { } , -- Text representation of an informational note.
|
|
||||||
-- TSWarning { } , -- Text representation of a warning note.
|
|
||||||
-- TSDanger { } , -- Text representation of a danger note.
|
|
||||||
-- TSType { } , -- Type (and class) definitions and annotations.
|
|
||||||
-- TSTypeBuiltin { } , -- Built-in types: `i32` in Rust.
|
|
||||||
-- TSVariable { } , -- Variable names that don't fit into other categories.
|
|
||||||
-- TSVariableBuiltin { } , -- Variable names defined by the language: `this` or `self` in Javascript.
|
|
||||||
}
|
}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue