Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(syntax-hl): misc corrections #289

Merged
merged 1 commit into from
Jul 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lua/github-theme/group/modules/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ If you want to stay on nvim 0.7, disable the module, or track on 'v0.0.x' branch
['@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' },

-- SCSS
['@property.scss'] = { link = '@constant' },
Expand Down
14 changes: 14 additions & 0 deletions lua/github-theme/group/syntax.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,20 @@ function M.get(spec, config)
diffFile = { fg = spec.diag.info }, -- The filename of the diff ('diff --git a/readme.md b/readme.md')
diffLine = { fg = syn.builtin2 }, -- Line information ('@@ -169,6 +169,9 @@')
diffIndexLine = { fg = syn.preproc }, -- Index line of diff ('index bf3763d..94f0f62 100644')

-- Language specific -------------------------------------------------------

-- Json
jsonKeyword = { fg = syn.tag }, -- Json keys (e.g. `"key": "value"`)
jsonNull = { link = 'Constant' },

-- Lua
luaFunction = { link = 'Keyword' }, -- Function keywords (`function`, `end`) (corrects upstream inaccuracy/bug)
luaTable = FALLBACK_OR_NONE, -- Table brackets (`{}`)

-- Yaml
yamlBlockMappingKey = { fg = syn.tag },
yamlFlowMappingKey = { fg = syn.tag },
}
end

Expand Down
4 changes: 4 additions & 0 deletions queries/rust/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@

; Make crate/self/super the @keyword color
[(crate) (self) (super)] @keyword

; Capture the ' in lifetimes separately
; TODO: upstream this capture
(lifetime "'" @storageclass.lifetime.punctuation)