diff --git a/lua/github-theme/group/modules/cmp.lua b/lua/github-theme/group/modules/cmp.lua index 81adc92c..ba3ab3bd 100644 --- a/lua/github-theme/group/modules/cmp.lua +++ b/lua/github-theme/group/modules/cmp.lua @@ -38,12 +38,12 @@ function M.get(spec, config, opts) CmpItemKindClass = { link = 'Type' }, CmpItemKindStruct = { link = 'Type' }, - CmpItemKindModule = { link = has_ts and '@namespace' or 'Identifier' }, + CmpItemKindModule = { link = has_ts and '@module' or 'Identifier' }, CmpItemKindProperty = { link = has_ts and '@property' or 'Identifier' }, - CmpItemKindField = { link = has_ts and '@field' or 'Identifier' }, - CmpItemKindTypeParameter = { link = has_ts and '@field' or 'Identifier' }, - CmpItemKindEnumMember = { link = has_ts and '@field' or 'Identifier' }, + CmpItemKindField = { link = has_ts and '@variable.member' or 'Identifier' }, + CmpItemKindTypeParameter = { link = has_ts and '@variable.member' or 'Identifier' }, + CmpItemKindEnumMember = { link = has_ts and '@variable.member' or 'Identifier' }, CmpItemKindOperator = { link = 'Operator' }, CmpItemKindSnippet = { fg = spec.fg2 }, } diff --git a/lua/github-theme/group/modules/lsp_semantic_tokens.lua b/lua/github-theme/group/modules/lsp_semantic_tokens.lua index 2dd0378d..66f1c9ad 100644 --- a/lua/github-theme/group/modules/lsp_semantic_tokens.lua +++ b/lua/github-theme/group/modules/lsp_semantic_tokens.lua @@ -9,7 +9,7 @@ function M.get(spec, config, opts) ['@lsp.type.keyword'] = { link = '@keyword' }, ['@lsp.type.interface'] = { link = '@interface' }, ['@lsp.type.namespace'] = { link = '@namespace' }, - ['@lsp.type.parameter'] = { link = '@parameter' }, + ['@lsp.type.parameter'] = { link = '@variable.parameter' }, ['@lsp.type.class'] = { link = '@function' }, ['@lsp.type.property'] = {}, -- use treesitter styles for regular properties ['@lsp.type.variable'] = {}, -- use treesitter styles for regular variables diff --git a/lua/github-theme/group/modules/treesitter.lua b/lua/github-theme/group/modules/treesitter.lua index 044a9596..75253e66 100644 --- a/lua/github-theme/group/modules/treesitter.lua +++ b/lua/github-theme/group/modules/treesitter.lua @@ -49,108 +49,156 @@ If you want to stay on nvim 0.7, disable the module, or track on 'v0.0.x' branch -- stylua: ignore return { - -- Misc - -- ['@comment'] = { link = 'Comment' }, - ['@error'] = { link = 'Error' }, - -- ['@preproc'] = { link = 'PreProc' }, -- Various preprocessor directives & shebangs - -- ['@define'] = { link = 'Define' }, -- Preprocessor definition directives - -- ['@operator'] = { link = 'Operator' }, -- For any operator: +, but also -> and * in C - - -- Punctuation - -- ['@punctuation.delimiter'] = { fg = syn.bracket }, -- For delimiters (e.g. `.`) - ['@punctuation.bracket'] = { fg = syn.bracket }, -- For brackets and parenthesis - ['@punctuation.special'] = { fg = syn.builtin2, style = stl.operators }, -- For special punctutation that does not fall in the catagories before - - -- Literals - -- ['@string'] = { link = 'String' }, -- For strings - ['@string.regex'] = { fg = syn.regex, style = stl.strings }, -- Regular expression literals - ['@string.escape'] = { fg = syn.regex, style = 'bold' }, -- Escape characters within a string: `\n`, `\t`, etc. - ['@string.special'] = { link = 'Special' }, -- Other special strings (e.g. dates) - -- ['@character'] = { link = 'Character' }, -- character literals - -- ['@character.special'] = { link = 'SpecialChar' }, -- special characters (e.g. wildcards) + -- Identifiers ------------------------------------------------------------- - -- ['@boolean'] = { link = 'Boolean' }, -- For booleans - -- ['@number'] = { link = 'Number' }, -- For all numbers - -- ['@float'] = { link = 'Float' }, -- For floats + ['@variable'] = { fg = syn.variable, style = stl.variables }, -- Any variable name that does not have another highlighC. + ['@variable.builtin'] = { fg = syn.builtin0, style = stl.variables }, -- Var names defined by the language: this, self, super + ['@variable.member'] = { fg = syn.field }, -- For fields + ['@variable.parameter'] = { fg = syn.param, stl.variables }, -- For parameters of a function - -- Functions - -- ['@function'] = { link = 'Function' }, -- For function (calls and definitions) - ['@function.builtin'] = FALLBACK_OR_NONE, -- For builtin functions: table.insert in Lua - -- ['@function.call'] = { link = '@function' }, -- Function calls - -- ['@function.macro'] = { fg = syn.builtin0, style = stl.functions }, -- Macro functions (calls & defs): macro_rules!, println!() - -- ['@method'] = { link = '@function'}, -- For method definitions/declarations - -- ['@method.call'] = { link = '@method' }, -- Method calls + -- ['@constant'] = { link = 'Constant' }, -- Constant identifiers + ['@constant.builtin'] = { fg = syn.builtin2, style = stl.keywords }, -- For constant that are built in the language: nil in Lua + ['@constant.macro'] = { link = 'Macro' }, -- For constants that are defined by macros: NULL in C - ['@constructor'] = { fg = pl.syntax.variable}, -- Constructor calls & defs: {} in Lua, new Type() (js/php), constructor() {} - ['@parameter'] = { fg = syn.param, stl.variables }, -- For parameters of a function + ['@module'] = { fg = syn.builtin1 }, -- For identifiers referring to modules and namespaces + ['@module.builtin'] = { fg = syn.builtin2 }, -- built-in modules or namespaces + ['@label'] = { link = '@tag' }, -- For labels: `label:` in C, `:label:` in Lua. - -- Keywords - -- ['@keyword'] = { link = 'Keyword' }, -- For keywords that don't fall in previous categories - ['@keyword.function'] = { fg = syn.keyword, style = stl.functions }, -- Keywords used to def a fn: `function` in Lua, `def` & `lambda` in Python - ['@keyword.operator'] = { fg = syn.keyword, style = stl.operators }, -- For `new` keyword operator, `sizeof`, etc. - -- ['@keyword.return'] = { fg = syn.keyword, style = stl.keywords }, - -- ['@conditional'] = { link = 'Conditional' }, -- For keywords related to conditionals. - -- ['@repeat'] = { link = 'Repeat' }, -- For keywords related to loops. - ['@label'] = { link = '@tag' }, -- For labels: `label:` in C, `:label:` in Lua. - -- ['@include'] = { link = 'Include' }, -- For includes: #include in C, use or extern crate in Rust, Lua require - ['@exception'] = { fg = syn.builtin0, style = stl.keywords }, -- Exception related keywords: `try`, `except`, `finally` in Python + -- Literals ----------------------------------------------------------------- + + -- ['@string'] = { link = 'String' }, -- For strings + -- ['@string.documentation'] = { link = 'String' }, -- String documenting code (e.g. Python docstrings) + ['@string.regexp'] = { fg = syn.regex, style = stl.strings }, -- Regular expression literals + ['@string.escape'] = { fg = syn.regex, style = 'bold' }, -- Escape characters within a string: `\n`, `\t`, etc. + + -- ['@string.special'] = { link = 'Special' }, -- Other special strings (e.g. dates) + ['@string.special.symbol'] = { fg = syn.preproc }, -- Symbols or atoms + ['@string.special.url'] = { fg = syn.const, style = 'italic,underline' }, -- URIs (e.g. hyperlinks) + -- ['@string.special.path'] = { fg = spec.palette.done.fg }, -- Filenames + + -- ['@character'] = { link = 'Character' }, -- character literals + -- ['@character.special'] = { link = 'SpecialChar' }, -- special characters (e.g. wildcards) + + -- ['@boolean'] = { link = 'Boolean' }, -- For booleans + -- ['@number'] = { link = 'Number' }, -- For all numbers + -- ['@number.float'] = { link = 'Float' }, -- For floats + + + -- Types -------------------------------------------------------------------- - -- Types ['@type'] = { fg = syn.type }, -- For custom/user/non-builtin types ['@type.builtin'] = { fg = syn.builtin1, style = stl.types }, -- For builtin types - -- ['@type.definition'] = { link = '@type' }, -- type definitions (e.g. `typedef` in C) + + -- ['@type.definition'] = { link = '@type' }, -- type definitions (e.g. `typedef` in C) ['@type.qualifier'] = { fg = syn.keyword }, -- type qualifiers (e.g. `const`, css's `!important`) - -- ['@storageclass'] = { link = 'StorageClass' }, -- Visibility/life-time/etc. modifiers (e.g. `static`) ['@attribute'] = { link = 'Constant' }, -- Attribute annotations (e.g. Python decorators) - ['@field'] = { fg = syn.field }, -- For fields - ['@property'] = { link = '@field' }, -- Same as @field + ['@property'] = { link = '@variable.member' }, -- Same as @field - -- Identifiers - ['@variable'] = { fg = syn.variable, style = stl.variables }, -- Any variable name that does not have another highlighC. - ['@variable.builtin'] = { fg = syn.builtin0, style = stl.variables }, -- Var names defined by the language: this, self, super - -- ['@constant'] = { link = 'Constant' }, -- For constants - ['@constant.builtin'] = { fg = syn.builtin2, style = stl.keywords }, -- For constant that are built in the language: nil in Lua - ['@constant.macro'] = { link = 'Macro' }, -- For constants that are defined by macros: NULL in C + -- Functions ---------------------------------------------------------------- + + -- ['@function'] = { link = 'Function' }, -- For function (calls and definitions) + ['@function.builtin'] = FALLBACK_OR_NONE, -- For builtin functions: table.insert in Lua + -- ['@function.call'] = { link = '@function' }, -- Function calls + -- ['@function.macro'] = { fg = syn.builtin0, style = stl.functions }, -- Macro functions (calls & defs): macro_rules!, println!() + + -- ['@function.method'] = { link = '@function'}, -- For method definitions/declarations + -- ['@function.method.call'] = { link = '@method' }, -- Method calls + + ['@constructor'] = { fg = pl.syntax.variable}, -- Constructor calls & defs: {} in Lua, new Type() (js/php), constructor() {} + -- ['@operator'] = { link = 'Operator' }, -- For any operator: +, but also -> and * in C + + + -- Keywords ----------------------------------------------------------------- + + -- ['@keyword'] = { link = 'Keyword' }, -- For keywords that don't fall in previous categories + -- ['@keyword.coroutine'] = { link = 'Keyword' }, -- Keywords related to coroutines (e.g. `go` in Go, `async/await` in Python) + ['@keyword.function'] = { fg = syn.keyword, style = stl.functions }, -- Keywords used to def a fn: `function` in Lua, `def` & `lambda` in Python + ['@keyword.operator'] = { fg = syn.keyword, style = stl.operators }, -- For `new` keyword operator, `sizeof`, etc. + -- ['@keyword.import'] = { link = 'Include' }, -- For includes: #include in C, use or extern crate in Rust, Lua require + -- ['@keyword.storage'] = { link = 'StorageClass' }, -- Visibility/life-time/etc. modifiers (e.g. `static`) + -- ['@keyword.repeat'] = { link = 'Repeat' }, -- For keywords related to loops. + -- ['@keyword.return'] = { fg = syn.keyword, style = stl.keywords }, + -- ['@keyword.debug'] = { link = spec.fg1 }, -- For keywords related to conditionals. + ['@keyword.exception'] = { fg = syn.builtin0, style = stl.keywords }, -- Exception related keywords: `try`, `except`, `finally` in Python + + -- ['@keyword.conditional'] = { link = 'Conditional' }, -- For keywords related to conditionals. + -- ['@keyword.conditional.ternary'] = { link = 'Keyword' }, -- ternary operator (e.g. `?` / `:`) + + -- ['@keyword.directive'] = { link = 'PreProc' }, -- Various preprocessor directives & shebangs + -- ['@keyword.directive.define'] = { link = 'Define' }, -- Preprocessor definition directives + + + -- Punctuation -------------------------------------------------------------- + + -- ['@punctuation.delimiter'] = { fg = syn.bracket }, -- For delimiters (e.g. `.`) + ['@punctuation.bracket'] = { fg = syn.bracket }, -- For brackets and parenthesis + -- ['@punctuation.special'] = { link = 'Special' }, -- Special symbols (e.g. `{}` in string interpolation) + + + -- Comment ------------------------------------------------------------------ + + -- ['@comment'] = { link = 'Comment' }, -- line and block comments + -- ['@comment.documentation'] = { link = 'Comment' }, -- comments documenting code + ['@comment.error'] = { fg = spec.bg1, bg = spec.diag.error }, -- error-type comments (e.g., `DEPRECATED:`) + ['@comment.warning'] = { fg = spec.bg1, bg = spec.diag.warn }, -- warning-type comments (e.g., `WARNING:`, `FIX:`) + ['@comment.hint'] = { fg = spec.bg1, bg = spec.diag.hint }, -- note-type comments (e.g., `NOTE:`) + ['@comment.info'] = { fg = spec.bg1, bg = spec.diag.info }, -- info-type comments + ['@comment.todo'] = { fg = spec.bg1, bg = spec.diag.hint }, -- Todo notes todo-type comments (e.g-, `TODO:`, `WIP:`) + + + -- Markup ------------------------------------------------------------------- + + ['@markup.strong'] = { fg = spec.fg1, style = 'bold' }, -- Bold text + ['@markup.italic'] = { fg = spec.fg1, style = 'italic' }, -- Text with emphasis + ['@markup.strikethrough'] = { fg = spec.fg1, style = 'strikethrough' }, -- Strikethrough text + -- ['@markup.underline'] = { link = 'Underlined' }, -- Underlined text (only for literal underline markup!) + + -- ['@markup.heading'] = { link = 'Title'}, -- Titles like: # Example + -- ['@markup.quote'] = { fg = syn.tag }, -- block quotes + -- ['@markup.math'] = { fg = syn.tag }, -- math environments (e.g. `$ ... $` in LaTeX) + ['@markup.environment'] = { fg = syn.preproc }, -- Text environments of markup languages + ['@markup.environment.name'] = { fg = syn.func }, -- Text indicating the type of an environment + + ['@markup.link'] = { fg = spec.fg1, style = 'underline' }, -- References + ['@markup.link.uri'] = { fg = syn.const, style = 'italic,underline' }, -- Urls, links and emails + ['@markup.link.label'] = { link = 'Special' }, -- Other special strings (e.g. dates) + + ['@markup.raw'] = { fg = syn.ident, style = 'italic' }, -- literal or verbatim text (e.g., inline code) + -- ['@markup.raw.block'] = { link = '@markup.raw' }, -- literal or verbatim text as a stand-alone block + + ['@markup.list'] = { fg = syn.builtin2, style = stl.operators }, -- For special punctutation that does not fall in the catagories before + ['@markup.list.checked'] = { fg = P.green.base }, -- checked todo-style list markers + ['@markup.list.unchecked'] = { fg = spec.fg3 }, -- unchecked todo-style list markers + + ['@diff.plus'] = { link = "diffAdded" }, -- added text (for diff files) + ['@diff.minus'] = { link = "diffRemoved" }, -- deleted text (for diff files) + ['@diff.delta'] = { link = "diffChanged" }, -- changed text (for diff files) + + + -- XML Tags ---------------------------------------------------------------- - ['@namespace'] = { fg = syn.builtin1 }, -- For identifiers referring to modules and namespaces - ['@symbol'] = { fg = syn.preproc }, - - -- Text - ['@text'] = { fg = spec.fg1 }, -- For strings considerated text in a markup language - ['@text.strong'] = { fg = spec.fg1, style = 'bold' }, -- Bold - ['@text.emphasis'] = { fg = spec.fg1, style = 'italic' }, -- Italic - -- ['@text.underline'] = { link = 'Underlined' }, -- Underlined text - ['@text.strike'] = { fg = spec.fg1, style = 'strikethrough' }, -- Strikethrough text - -- ['@text.title'] = { link = 'Title'}, -- Titles like: # Example - ['@text.literal'] = { fg = syn.ident, style = 'italic' }, -- Used for inline code in markdown and for doc in python (''') - ['@text.uri'] = { fg = syn.const, style = 'italic,underline' }, -- Urls, links and emails - ['@text.math'] = { fg = syn.func }, -- Math environments (e.g. `$ ... $` in LaTeX) - ['@text.environment'] = { fg = syn.preproc }, -- Text environments of markup languages - ['@text.environment.name'] = { fg = syn.func }, -- Text indicating the type of an environment - ['@text.reference'] = { fg = spec.fg1, style = 'underline' }, -- References - - ['@text.todo'] = { fg = spec.bg1, bg = spec.diag.hint }, -- Todo notes - ['@text.note'] = { fg = spec.bg1, bg = spec.diag.info }, - ['@text.warning'] = { fg = spec.bg1, bg = spec.diag.warn }, - ['@text.danger'] = { fg = spec.bg1, bg = spec.diag.error }, - ['@text.todo.unchecked'] = { fg = spec.fg3 }, -- For brackets and parens - ['@text.todo.checked'] = { fg = P.green.base }, -- For brackets and parens - - ['@text.diff.add'] = { link = 'diffAdded' }, -- Added text (for diff files) - ['@text.diff.delete'] = { link = 'diffRemoved' }, -- Deleted text (for diff files) - ['@diff.plus'] = { link = "diffAdded" }, - ['@diff.minus'] = { link = "diffRemoved" }, - ['@diff.delta'] = { link = "diffChanged" }, - - -- Tags ['@tag'] = { fg = syn.tag }, -- Tags like html tag names - ['@tag.attribute'] = { link = '@field' }, -- Tag attributes (e.g. HTML element attributes) + ['@tag.attribute'] = { link = '@variable.member' }, -- Tag attributes (e.g. HTML element attributes) ['@tag.delimiter'] = FALLBACK_OR_NONE, -- Tag delimiter like `<`, `>`, `/`, etc. + -- Non-highlighting captures ----------------------------------------------- + + ['@none'] = { link = 'NONE' }, -- completely disable the highlight + ['@conceal'] = { link = 'Conceal' }, -- captures that are only meant to be concealed + + + + -- [DEPRECATED] ------------------------------------------------------------ + -- ['@error'] = { link = 'Error' }, + -- ['@text.diff.add'] = { link = 'diffAdded' }, -- Added text (for diff files) + -- ['@text.diff.delete'] = { link = 'diffRemoved' }, -- Deleted text (for diff files) + + + -- Language specific ------------------------------------------------------- -- Bash @@ -160,7 +208,7 @@ If you want to stay on nvim 0.7, disable the module, or track on 'v0.0.x' branch ['@number.bash'] = FALLBACK_OR_NONE, -- ['@punctuation.bracket.bash'] = { fg = syn.string }, -- $(, (, ), [, ], ((, )) ['@punctuation.delimiter.bash'] = { fg = syn.keyword }, -- ; and ;; - ['@punctuation.special.bash'] = { link = "@punctuation.bash" }, -- $ + ['@markup.list.bash'] = { link = "@punctuation.bash" }, -- $ -- C ['@type.c'] = { fg = spec.variable }, @@ -171,23 +219,23 @@ If you want to stay on nvim 0.7, disable the module, or track on 'v0.0.x' branch -- C_sharp -- ['@type.c_sharp'] = { link = '@function' }, - ['@namespace.c_sharp'] = { fg = pl.syntax.variable }, + ['@module.c_sharp'] = { fg = pl.syntax.variable }, -- Go -- ['@function.call.go'] = { link = '@constant' }, - -- ['@function.go'] = { link = '@field' }, - -- ['@method.call.go'] = { link = '@constant' }, - ['@namespace.go'] = FALLBACK_OR_NONE, + -- ['@function.go'] = { link = '@variable.member' }, + -- ['@function.method.call.go'] = { link = '@constant' }, + ['@module.go'] = FALLBACK_OR_NONE, -- Html - ['@text.title.html'] = { fg = spec.fg1 }, + ['@markup.heading.html'] = { fg = spec.fg1 }, ['@constant.html'] = { link = '@tag' }, -- Java -- ['@type.java'] = { link = '@function' }, -- JavaScript - -- ['@constructor.ecma'] = { link = '@method' }, + -- ['@constructor.ecma'] = { link = '@function.method' }, -- ['@property.javascript'] = { link = '@variable' }, -- ['@type.ecma'] = { fg = pl.syntax.variable }, -- ['@variable.builtin.javascript'] = { link = '@constant' }, @@ -209,31 +257,31 @@ If you want to stay on nvim 0.7, disable the module, or track on 'v0.0.x' branch ['@operator.lua'] = { fg = syn.keyword, style = stl.operators }, ['@field.lua'] = { fg = syn.variable }, ['@function.call.lua'] = { fg = syn.const }, - ['@method.call.lua'] = { link = '@function.call.lua' }, - ['@namespace.builtin.lua'] = { fg = syn.const }, -- `table`, `io`, `_G` + ['@function.method.call.lua'] = { link = '@function.call.lua' }, + ['@module.builtin.lua'] = { fg = syn.const }, -- `table`, `io`, `_G` ['@label.lua'] = { fg = syn.const }, -- The `LABEL` in `::LABEL::` and `goto LABEL` ['@field.luadoc'] = { link = '@field.lua' }, ['@operator.luadoc'] = { fg = spec.fg1 }, -- The `|` in `string|number` - ['@punctuation.special.luadoc'] = { fg = spec.fg1 }, -- The `?` in `string?` + ['@markup.list.luadoc'] = { fg = spec.fg1 }, -- The `?` in `string?` -- Make - -- ['@operator.make'] = { link = '@constant' }, - ['@symbol.make'] = { link = '@function' }, + -- ['@operator.make'] = { link = '@constant' }, + ['@string.special.symbol.make'] = { link = '@function' }, ['@function.builtin.make'] = { link = '@constant' }, -- Markdown ['@punctuation.delimiter.markdown'] = { fg = spec.fg1 }, ['@punctuation.delimiter.markdown_inline'] = { fg = spec.fg1 }, - ['@text.quote.markdown'] = { fg = syn.tag }, + ['@markup.quote.markdown'] = { fg = syn.tag }, -- Nix - ['@variable.member.nix'] = { link = '@field' }, - ['@variable.parameter.nix'] = { link = '@parameter' }, + ['@variable.member.nix'] = { link = '@variable.member' }, + ['@variable.parameter.nix'] = { link = '@variable.parameter' }, ['@string.special.path.nix'] = { link = '@string' }, -- PHP -- ['@type.php'] = { link = '@function' }, - ['@namespace.php'] = { link = '@constructor.php' }, + ['@module.php'] = { link = '@constructor.php' }, -- Python ['@field.python'] = { fg = spec.fg1 }, @@ -244,19 +292,19 @@ If you want to stay on nvim 0.7, disable the module, or track on 'v0.0.x' branch -- Ruby ['@label.ruby'] = { fg = syn.const }, - ['@symbol.ruby'] = { link = '@constant' }, + ['@string.special.symbol.ruby'] = { link = '@constant' }, -- Rust -- ['@field.rust'] = { fg = spec.fg2 }, ['@constant.builtin.rust'] = { fg = pl.syntax.variable }, - ['@namespace.rust'] = FALLBACK_OR_NONE, - ['@preproc.rust'] = { fg = syn.const }, - ['@storageclass.lifetime.rust'] = { link = '@tag.rust' }, - ['@storageclass.lifetime.punctuation.rust'] = { link = '@punctuation.special.rust' }, + ['@module.rust'] = FALLBACK_OR_NONE, + ['@keyword.directive.rust'] = { fg = syn.const }, + ['@keyword.storage.lifetime.rust'] = { link = '@tag.rust' }, + ['@keyword.storage.lifetime.punctuation.rust'] = { link = '@markup.list.rust' }, -- SCSS ['@property.scss'] = { link = '@constant' }, - ['@variable.scss'] = { link = '@parameter' }, + ['@variable.scss'] = { link = '@variable.parameter' }, -- SQL ['@field.sql'] = { link = '@constant' }, @@ -271,9 +319,9 @@ If you want to stay on nvim 0.7, disable the module, or track on 'v0.0.x' branch -- ['@variable.typescript'] = { link = '@constant' }, -- VimDoc (vim help files/docs) - ['@parameter.vimdoc'] = { fg = pl.syntax.variable }, + ['@variable.parameter.vimdoc'] = { fg = pl.syntax.variable }, ['@label.vimdoc'] = { link = '@keyword' }, -- `*sometag*` - -- ['@string.special.vimdoc'] = { link = '@parameter.vimdoc' }, -- `CTRL-W`, etc. (unused atm, not well-defined) + -- ['@markup.link.label.vimdoc'] = { link = '@variable.parameter.vimdoc' }, -- `CTRL-W`, etc. (unused atm, not well-defined) -- Yaml ['@field.yaml'] = { link = '@tag' }, diff --git a/queries/bash/highlights.scm b/queries/bash/highlights.scm index 5ab2ab17..701104e8 100644 --- a/queries/bash/highlights.scm +++ b/queries/bash/highlights.scm @@ -17,4 +17,4 @@ "$" @variable) (subscript - index: (word) @punctuation.special (#any-of? @punctuation.special "@" "*")) + index: (word) @markup.list (#any-of? "@" "*")) diff --git a/queries/rust/highlights.scm b/queries/rust/highlights.scm index 8e84f14c..f13bc986 100644 --- a/queries/rust/highlights.scm +++ b/queries/rust/highlights.scm @@ -9,7 +9,7 @@ ([ (attribute_item) (inner_attribute_item) - ] @preproc (#set! "priority" 101)) + ] @keyword.directive (#set! "priority" 101)) (attribute_item (attribute @@ -24,4 +24,4 @@ ; Capture the ' in lifetimes separately ; TODO: upstream this capture -(lifetime "'" @storageclass.lifetime.punctuation) +(lifetime "'" @keyword.storage.lifetime.punctuation) diff --git a/queries/solidity/highlights.scm b/queries/solidity/highlights.scm index 9ec6ce13..b9b5b8e0 100644 --- a/queries/solidity/highlights.scm +++ b/queries/solidity/highlights.scm @@ -77,12 +77,12 @@ ; Function parameters (call_struct_argument name: (identifier) @field) -(event_paramater name: (identifier) @parameter) +(event_paramater name: (identifier) @variable.parameter) (parameter name: (identifier) @variable.parameter) ; Yul functions (yul_function_call function: (yul_identifier) @function) -(yul_function_definition . (yul_identifier) @function (yul_identifier) @parameter) +(yul_function_definition . (yul_identifier) @function (yul_identifier) @variable.parameter) ; Structs and members @@ -146,7 +146,7 @@ [ "try" "catch" -] @exception +] @keyword.exception [ "return" @@ -155,9 +155,9 @@ "function" @keyword.function -"import" @include -(import_directive "as" @include) -(import_directive "from" @include) +"import" @keyword.import +(import_directive "as" @keyword.import) +(import_directive "from" @keyword.import) (event_paramater "indexed" @keyword)