Skip to content

Commit 3ca821e

Browse files
committed
🎨 Refine syntax highlighting colors and styling
Update semantic color mappings and TreeSitter highlighting styles - Change variable color from pink to fg for better readability - Update number and constant colors to coral for consistency - Set function colors to cyan with bold styling - Change operator color to fg_dark for subtle appearance - Update bracket color to fg instead of purple - Add coral color with italics for builtin variables - Remove italic styling from Function highlight group - Add bold styling to keywords, functions, and methods in TreeSitter - Add Python-specific highlighting for builtin parameters and variables
1 parent c93729e commit 3ca821e

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

lua/silkcircuit/integrations/treesitter.lua

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function M.get(colors, opts)
1919

2020
-- Identifiers
2121
highlights["@variable"] = { fg = sem.variable }
22-
highlights["@variable.builtin"] = { fg = colors.cyan }
22+
highlights["@variable.builtin"] = { fg = colors.coral, italic = true }
2323
highlights["@variable.parameter"] = { fg = sem.parameter }
2424
highlights["@variable.member"] = { fg = sem.property }
2525

@@ -58,18 +58,18 @@ function M.get(colors, opts)
5858
highlights["@property"] = { fg = sem.property }
5959

6060
-- Functions
61-
highlights["@function"] = apply_style({ fg = sem.func }, "functions")
62-
highlights["@function.builtin"] = { fg = sem.func_call }
61+
highlights["@function"] = apply_style({ fg = sem.func, bold = true }, "functions")
62+
highlights["@function.builtin"] = { fg = sem.function_builtin }
6363
highlights["@function.call"] = { fg = sem.func_call }
6464
highlights["@function.macro"] = { fg = colors.purple }
65-
highlights["@function.method"] = apply_style({ fg = sem.method }, "functions")
65+
highlights["@function.method"] = apply_style({ fg = sem.method, bold = true }, "functions")
6666
highlights["@function.method.call"] = { fg = sem.func_call }
6767

6868
highlights["@constructor"] = { fg = sem.type }
6969
highlights["@operator"] = apply_style({ fg = sem.operator }, "operators")
7070

7171
-- Keywords
72-
highlights["@keyword"] = apply_style({ fg = sem.keyword }, "keywords")
72+
highlights["@keyword"] = apply_style({ fg = sem.keyword, bold = true }, "keywords")
7373
highlights["@keyword.coroutine"] = { fg = colors.keyword }
7474
highlights["@keyword.function"] = { fg = colors.purple }
7575
highlights["@keyword.operator"] = { fg = colors.operator }
@@ -137,6 +137,10 @@ function M.get(colors, opts)
137137
highlights["@diff.delta"] = { fg = colors.git_change }
138138

139139
-- Language specific highlights
140+
141+
-- Python
142+
highlights["@variable.parameter.builtin.python"] = { fg = colors.coral, italic = true } -- self, cls
143+
highlights["@variable.builtin.python"] = { fg = colors.coral } -- __name__, __file__, etc
140144
-- Bash
141145
highlights["@function.builtin.bash"] = { fg = colors.red, italic = true }
142146

lua/silkcircuit/palette.lua

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,27 +119,27 @@ function M.update_semantic(colors)
119119
M.semantic = {
120120
-- Syntax (consistent across all languages)
121121
keyword = colors.purple,
122-
variable = colors.pink,
122+
variable = colors.fg,
123123
string = colors.pink_bright,
124-
number = colors.purple_dark,
124+
number = colors.coral,
125125
boolean = colors.pink,
126-
constant = colors.purple_dark,
127-
func = colors.glow_purple,
128-
["function"] = colors.glow_purple,
129-
function_builtin = colors.purple_bright,
126+
constant = colors.coral,
127+
func = colors.cyan,
128+
["function"] = colors.cyan,
129+
function_builtin = colors.cyan_bright,
130130
func_call = colors.cyan,
131-
method = colors.glow_purple,
131+
method = colors.cyan,
132132
class = colors.yellow,
133133
type = colors.yellow,
134134
type_builtin = colors.yellow_bright,
135-
operator = colors.cyan,
135+
operator = colors.fg_dark,
136136
comment = colors.purple_muted,
137137
punctuation = colors.fg_dark,
138-
bracket = colors.purple,
138+
bracket = colors.fg,
139139
tag = colors.pink,
140140
attribute = colors.purple,
141141
property = colors.cyan_bright,
142-
parameter = colors.pink,
142+
parameter = colors.fg,
143143

144144
-- Special syntax elements
145145
namespace = colors.purple,

lua/silkcircuit/theme.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function M.get_highlights(colors, opts)
108108
highlights.Float = { fg = sem.number }
109109

110110
highlights.Identifier = { fg = sem.variable }
111-
highlights.Function = apply_style({ fg = sem.func, bold = true, italic = true }, "functions")
111+
highlights.Function = apply_style({ fg = sem.func, bold = true }, "functions")
112112

113113
highlights.Statement = { fg = sem.keyword }
114114
highlights.Conditional = apply_style({ fg = sem.keyword }, "conditionals")

0 commit comments

Comments
 (0)