From 374b9d9c4f792c002f6e101a7a9365b92cecf8c4 Mon Sep 17 00:00:00 2001 From: paytonward6 Date: Tue, 1 Oct 2024 16:57:20 -0500 Subject: [PATCH 1/2] fix(Color): use proper Elixir module/atom colors --- lua/github-theme/group/modules/treesitter.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/github-theme/group/modules/treesitter.lua b/lua/github-theme/group/modules/treesitter.lua index 2cbf241..2431849 100644 --- a/lua/github-theme/group/modules/treesitter.lua +++ b/lua/github-theme/group/modules/treesitter.lua @@ -307,6 +307,10 @@ 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 + ['@string.special.symbol.elixir'] = { link = '@constant' }, + ['@module.elixir'] = { link = '@type' }, + -- Rust ['@constant.builtin.rust'] = { fg = pl.syntax.variable }, ['@module.rust'] = FALLBACK_OR_NONE, From a9e186b4a3dcbfee2476fcf60596b7e636b1bf7a Mon Sep 17 00:00:00 2001 From: Tyler Miller Date: Mon, 30 Dec 2024 22:06:20 -0800 Subject: [PATCH 2/2] 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. --- CHANGELOG.md | 1 + lua/github-theme/group/modules/treesitter.lua | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5287ad7..5210220 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lua/github-theme/group/modules/treesitter.lua b/lua/github-theme/group/modules/treesitter.lua index 2431849..7f0e741 100644 --- a/lua/github-theme/group/modules/treesitter.lua +++ b/lua/github-theme/group/modules/treesitter.lua @@ -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 @@ -308,7 +308,6 @@ If you want to stay on nvim 0.7, disable the module, or track on 'v0.0.x' branch ['@string.special.symbol.ruby'] = { link = '@constant' }, -- Elixir - ['@string.special.symbol.elixir'] = { link = '@constant' }, ['@module.elixir'] = { link = '@type' }, -- Rust