Skip to content

Commit c106c94

Browse files
paytonward6tmillr
andauthored
fix(treesitter): elixir module/atom colors (#366)
* fix(Color): use proper Elixir module/atom colors * fix(treesitter): elixir module/atom colors - Fix highlight of modules (module names) in elixir. - Link `@string.special.symbol` -> `@constant`, which fixes/improves the highlight of symbols/atoms in elixir. NOTE: Technically, github.com uses the string color (i.e. `@string`) for elixir atoms currently, but other langs (e.g. Ruby) use the constant (i.e. `@constant`) color. We'll let elixir use the default of `@constant` for now for consistency and simplicity. --------- Co-authored-by: Tyler Miller <[email protected]>
1 parent cfd8b55 commit c106c94

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic
1717
- Fixed JSX/TSX tags are missing highlights with nvim 0.10 (#360)
1818
- Fixed loading palette or spec before colorscheme disrupts colors (#362 fixed-by #363)
1919
- Fixed incorrect highlight of name/binding in python import statements (#371)
20+
- Fixed elixir module/atom colors (#366)
2021

2122
## [v1.1.2] - 05 August 2024
2223

lua/github-theme/group/modules/treesitter.lua

+4-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ If you want to stay on nvim 0.7, disable the module, or track on 'v0.0.x' branch
8080
['@string.escape'] = { fg = syn.regex, style = 'bold' }, -- Escape characters within a string: `\n`, `\t`, etc.
8181

8282
-- ['@string.special'] = { link = 'Special' }, -- Other special strings (e.g. dates)
83-
['@string.special.symbol'] = { fg = syn.preproc }, -- Symbols or atoms
83+
['@string.special.symbol'] = { link = '@constant' }, -- Symbols or atoms
8484
['@string.special.url'] = { fg = syn.const, style = 'italic,underline' }, -- URIs (e.g. hyperlinks)
8585
-- ['@string.special.path'] = { fg = spec.palette.done.fg }, -- Filenames
8686

@@ -307,6 +307,9 @@ If you want to stay on nvim 0.7, disable the module, or track on 'v0.0.x' branch
307307
['@label.ruby'] = { fg = syn.const },
308308
['@string.special.symbol.ruby'] = { link = '@constant' },
309309

310+
-- Elixir
311+
['@module.elixir'] = { link = '@type' },
312+
310313
-- Rust
311314
['@constant.builtin.rust'] = { fg = pl.syntax.variable },
312315
['@module.rust'] = FALLBACK_OR_NONE,

0 commit comments

Comments
 (0)