Skip to content

Commit

Permalink
fix(treesitter): elixir module/atom colors (#366)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
paytonward6 and tmillr authored Dec 31, 2024
1 parent cfd8b55 commit c106c94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic
- Fixed JSX/TSX tags are missing highlights with nvim 0.10 (#360)
- Fixed loading palette or spec before colorscheme disrupts colors (#362 fixed-by #363)
- Fixed incorrect highlight of name/binding in python import statements (#371)
- Fixed elixir module/atom colors (#366)

## [v1.1.2] - 05 August 2024

Expand Down
5 changes: 4 additions & 1 deletion lua/github-theme/group/modules/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ If you want to stay on nvim 0.7, disable the module, or track on 'v0.0.x' branch
['@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.symbol'] = { link = '@constant' }, -- 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

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

-- Elixir
['@module.elixir'] = { link = '@type' },

-- Rust
['@constant.builtin.rust'] = { fg = pl.syntax.variable },
['@module.rust'] = FALLBACK_OR_NONE,
Expand Down

0 comments on commit c106c94

Please sign in to comment.