Skip to content

Commit 28e1972

Browse files
committed
Map spec.syntax to prettylights primitives
1 parent 262dbe8 commit 28e1972

9 files changed

+213
-213
lines changed

lua/github-theme/palette/github_dark.lua

+30-30
Original file line numberDiff line numberDiff line change
@@ -178,39 +178,39 @@ local function generate_spec(pal)
178178
bg3 = pal.scale.gray[6], -- Lighter bg (cursor line)
179179
bg4 = pal.scale.gray[4], -- Conceal
180180

181-
fg0 = pal.fg.subtle, -- Lighter fg
182-
fg1 = pal.fg.default, -- Default fg
183-
fg2 = pal.fg.muted, -- Darker fg (status line)
184-
fg3 = pal.scale.gray[5], -- Darker fg (line numbers, fold columns)
185-
186-
sel0 = alpha(C(pal.accent.fg), 0.30), -- Visual selection bg
187-
sel1 = alpha(C(pal.accent.muted), 0.90), -- Popup sel bg
188-
sel2 = alpha(C(pal.scale.yellow[1]), 0.20), -- Search bg
181+
fg0 = pal.fg.subtle, -- Lighter fg
182+
fg1 = pal.fg.default, -- Default fg
183+
fg2 = pal.fg.muted, -- Darker fg (status line)
184+
fg3 = pal.scale.gray[5], -- Darker fg (line numbers, fold columns)
185+
186+
sel0 = alpha(C(pal.accent.fg), 0.30), -- Visual selection bg
187+
sel1 = alpha(C(pal.accent.muted), 0.90), -- Popup sel bg
188+
sel2 = alpha(C(pal.scale.yellow[1]), 0.20), -- Search bg
189189
}
190190

191191
spec.syntax = {
192-
bracket = pal.scale.orange[3], -- Brackets and Punctuation
193-
builtin0 = pal.scale.red[4], -- Builtin variable (Return Keywords, Regex, etc.)
194-
builtin1 = pal.scale.red[4], -- Builtin type
195-
builtin2 = pal.scale.blue[3], -- Builtin const
196-
comment = pal.scale.gray[5], -- Comment
197-
conditional = pal.scale.red[4], -- Conditional and loop
198-
const = pal.scale.blue[3], -- Constants, imports and booleans
199-
dep = pal.scale.red[3], -- Deprecated
200-
field = pl.syntax.constant, -- Field
201-
func = pal.scale.purple[2], -- Functions and Titles
202-
ident = pal.scale.blue[3], -- Identifiers
203-
keyword = pal.scale.red[4], -- Keywords
204-
number = pal.scale.blue[3], -- Numbers
205-
operator = pl.syntax.constant, -- Operators
206-
param = spec.fg1, -- Parameters
207-
preproc = pal.scale.red[4], -- PreProc
208-
regex = pal.scale.blue[3], -- Regex
209-
statement = pal.scale.red[4], -- Statements
210-
string = pal.scale.blue[2], -- Strings
211-
type = pl.syntax.variable, -- Types
212-
tag = pal.scale.green[2], -- Tags
213-
variable = spec.fg1, -- Variables
192+
bracket = spec.fg1, -- Brackets and Punctuation
193+
builtin0 = pl.syntax.constant, -- Builtin variable
194+
builtin1 = pl.syntax.keyword, -- Builtin type
195+
builtin2 = pl.syntax.constant, -- Builtin const
196+
comment = pl.syntax.comment, -- Comment
197+
conditional = pl.syntax.keyword, -- Conditional and loop
198+
const = pl.syntax.constant, -- Constants, imports and booleans
199+
dep = pal.scale.red[3], -- Deprecated
200+
field = pl.syntax.constant, -- Field
201+
func = pl.syntax.entity, -- Functions and Titles
202+
ident = spec.fg1, -- Identifiers
203+
keyword = pl.syntax.keyword, -- Keywords
204+
number = pl.syntax.constant, -- Numbers
205+
operator = pl.syntax.constant, -- Operators
206+
param = spec.fg1, -- Parameters
207+
preproc = pl.syntax.keyword, -- PreProc
208+
regex = pl.syntax.string, -- Regex
209+
statement = pl.syntax.keyword, -- Statements
210+
string = pl.syntax.string, -- Strings
211+
type = pl.syntax.variable, -- Types
212+
tag = pl.syntax.entityTag, -- Tags
213+
variable = spec.fg1, -- Variables
214214
}
215215

216216
spec.diag = {

lua/github-theme/palette/github_dark_colorblind.lua

+30-30
Original file line numberDiff line numberDiff line change
@@ -178,39 +178,39 @@ local function generate_spec(pal)
178178
bg3 = pal.scale.gray[9], -- Lighter bg (cursor line)
179179
bg4 = pal.scale.gray[4], -- Conceal
180180

181-
fg0 = pal.fg.subtle, -- Lighter fg
182-
fg1 = pal.fg.default, -- Default fg
183-
fg2 = pal.fg.muted, -- Darker fg (status line)
184-
fg3 = pal.scale.gray[5], -- Darker fg (line numbers, fold columns)
185-
186-
sel0 = alpha(C(pal.accent.fg), 0.45), -- Visual selection bg
187-
sel1 = alpha(C(pal.accent.muted), 0.90), -- Popup sel bg
188-
sel2 = alpha(C(pal.scale.yellow[3]), 0.60), -- Search bg
181+
fg0 = pal.fg.subtle, -- Lighter fg
182+
fg1 = pal.fg.default, -- Default fg
183+
fg2 = pal.fg.muted, -- Darker fg (status line)
184+
fg3 = pal.scale.gray[5], -- Darker fg (line numbers, fold columns)
185+
186+
sel0 = alpha(C(pal.accent.fg), 0.45), -- Visual selection bg
187+
sel1 = alpha(C(pal.accent.muted), 0.90), -- Popup sel bg
188+
sel2 = alpha(C(pal.scale.yellow[3]), 0.60), -- Search bg
189189
}
190190

191191
spec.syntax = {
192-
bracket = pal.scale.orange[3], -- Brackets and Punctuation
193-
builtin0 = pal.scale.red[4], -- Builtin variable (Return Keywords, Regex, etc.)
194-
builtin1 = pal.scale.red[4], -- Builtin type
195-
builtin2 = pal.scale.blue[3], -- Builtin const
196-
comment = pal.scale.gray[5], -- Comment
197-
conditional = pal.scale.red[4], -- Conditional and loop
198-
const = pal.scale.blue[3], -- Constants, imports and booleans
199-
dep = pal.scale.red[3], -- Deprecated
200-
field = pl.syntax.constant, -- Field
201-
func = pal.scale.purple[3], -- Functions and Titles
202-
ident = pal.scale.blue[3], -- Identifiers
203-
keyword = pal.scale.red[4], -- Keywords
204-
number = pal.scale.blue[3], -- Numbers
205-
operator = pl.syntax.constant, -- Operators
206-
param = spec.fg1, -- Parameters
207-
preproc = pal.scale.red[4], -- PreProc
208-
regex = pal.scale.blue[3], -- Regex
209-
statement = pal.scale.red[4], -- Statements
210-
string = pal.scale.blue[2], -- Strings
211-
type = pl.syntax.variable, -- Types
212-
tag = pal.scale.blue[3], -- Tags
213-
variable = spec.fg1, -- Variables
192+
bracket = spec.fg1, -- Brackets and Punctuation
193+
builtin0 = pl.syntax.constant, -- Builtin variable
194+
builtin1 = pl.syntax.keyword, -- Builtin type
195+
builtin2 = pl.syntax.constant, -- Builtin const
196+
comment = pl.syntax.comment, -- Comment
197+
conditional = pl.syntax.keyword, -- Conditional and loop
198+
const = pl.syntax.constant, -- Constants, imports and booleans
199+
dep = pal.scale.red[3], -- Deprecated
200+
field = pl.syntax.constant, -- Field
201+
func = pl.syntax.entity, -- Functions and Titles
202+
ident = spec.fg1, -- Identifiers
203+
keyword = pl.syntax.keyword, -- Keywords
204+
number = pl.syntax.constant, -- Numbers
205+
operator = pl.syntax.constant, -- Operators
206+
param = spec.fg1, -- Parameters
207+
preproc = pl.syntax.keyword, -- PreProc
208+
regex = pl.syntax.string, -- Regex
209+
statement = pl.syntax.keyword, -- Statements
210+
string = pl.syntax.string, -- Strings
211+
type = pl.syntax.variable, -- Types
212+
tag = pl.syntax.entityTag, -- Tags
213+
variable = spec.fg1, -- Variables
214214
}
215215

216216
spec.diag = {

lua/github-theme/palette/github_dark_dimmed.lua

+30-30
Original file line numberDiff line numberDiff line change
@@ -178,39 +178,39 @@ local function generate_spec(pal)
178178
bg3 = alpha(C(pal.fg.default), 0.1), -- Lighter bg (cursor line)
179179
bg4 = pal.scale.gray[4], -- Conceal
180180

181-
fg0 = pal.fg.subtle, -- Lighter fg
182-
fg1 = pal.fg.default, -- Default fg
183-
fg2 = pal.fg.muted, -- Darker fg (status line)
184-
fg3 = pal.scale.gray[5], -- Darker fg (line numbers, fold columns)
185-
186-
sel0 = alpha(C(pal.accent.fg), 0.40), -- Visual selection bg
187-
sel1 = alpha(C(pal.accent.muted), 0.90), -- Popup sel bg
188-
sel2 = alpha(C(pal.scale.yellow[1]), 0.20), -- Search bg
181+
fg0 = pal.fg.subtle, -- Lighter fg
182+
fg1 = pal.fg.default, -- Default fg
183+
fg2 = pal.fg.muted, -- Darker fg (status line)
184+
fg3 = pal.scale.gray[5], -- Darker fg (line numbers, fold columns)
185+
186+
sel0 = alpha(C(pal.accent.fg), 0.40), -- Visual selection bg
187+
sel1 = alpha(C(pal.accent.muted), 0.90), -- Popup sel bg
188+
sel2 = alpha(C(pal.scale.yellow[1]), 0.20), -- Search bg
189189
}
190190

191191
spec.syntax = {
192-
bracket = spec.fg1, -- Brackets and Punctuation
193-
builtin0 = pal.scale.red[4], -- Builtin variable (Return Keywords, Regex, etc.)
194-
builtin1 = pal.scale.red[4], -- Builtin type
195-
builtin2 = pal.scale.blue[3], -- Builtin const
196-
comment = pal.scale.gray[5], -- Comment
197-
conditional = pal.scale.red[4], -- Conditional and loop
198-
const = pal.scale.blue[3], -- Constants, imports and booleans
199-
dep = pal.scale.red[3], -- Deprecated
200-
field = pl.syntax.constant, -- Field
201-
func = pal.scale.purple[2], -- Functions and Titles
202-
ident = pal.scale.blue[3], -- Identifiers
203-
keyword = pal.scale.red[4], -- Keywords
204-
number = pal.scale.blue[3], -- Numbers
205-
operator = pl.syntax.constant, -- Operators
206-
param = spec.fg1, -- Parameters
207-
preproc = pal.scale.red[4], -- PreProc
208-
regex = pal.scale.blue[3], -- Regex
209-
statement = pal.scale.red[4], -- Statements
210-
string = pal.scale.blue[2], -- Strings
211-
type = pl.syntax.variable, -- Types
212-
tag = pal.scale.green[2], -- Tags
213-
variable = spec.fg1, -- Variables
192+
bracket = spec.fg1, -- Brackets and Punctuation
193+
builtin0 = pl.syntax.constant, -- Builtin variable
194+
builtin1 = pl.syntax.keyword, -- Builtin type
195+
builtin2 = pl.syntax.constant, -- Builtin const
196+
comment = pl.syntax.comment, -- Comment
197+
conditional = pl.syntax.keyword, -- Conditional and loop
198+
const = pl.syntax.constant, -- Constants, imports and booleans
199+
dep = pal.scale.red[3], -- Deprecated
200+
field = pl.syntax.constant, -- Field
201+
func = pl.syntax.entity, -- Functions and Titles
202+
ident = spec.fg1, -- Identifiers
203+
keyword = pl.syntax.keyword, -- Keywords
204+
number = pl.syntax.constant, -- Numbers
205+
operator = pl.syntax.constant, -- Operators
206+
param = spec.fg1, -- Parameters
207+
preproc = pl.syntax.keyword, -- PreProc
208+
regex = pl.syntax.string, -- Regex
209+
statement = pl.syntax.keyword, -- Statements
210+
string = pl.syntax.string, -- Strings
211+
type = pl.syntax.variable, -- Types
212+
tag = pl.syntax.entityTag, -- Tags
213+
variable = spec.fg1, -- Variables
214214
}
215215

216216
spec.diag = {

lua/github-theme/palette/github_dark_high_contrast.lua

+30-30
Original file line numberDiff line numberDiff line change
@@ -178,39 +178,39 @@ local function generate_spec(pal)
178178
bg3 = alpha(C(pal.fg.default), 0.1), -- Lighter bg (cursor line)
179179
bg4 = pal.scale.gray[4], -- Conceal
180180

181-
fg0 = pal.fg.subtle, -- Lighter fg
182-
fg1 = pal.fg.default, -- Default fg
183-
fg2 = pal.fg.muted, -- Darker fg (status line)
184-
fg3 = pal.scale.gray[5], -- Darker fg (line numbers, fold columns)
185-
186-
sel0 = alpha(C(pal.accent.fg), 0.30), -- Visual selection bg
187-
sel1 = alpha(C(pal.accent.muted), 0.90), -- Popup sel bg
188-
sel2 = alpha(C(pal.scale.yellow[1]), 0.20), -- Search bg
181+
fg0 = pal.fg.subtle, -- Lighter fg
182+
fg1 = pal.fg.default, -- Default fg
183+
fg2 = pal.fg.muted, -- Darker fg (status line)
184+
fg3 = pal.scale.gray[5], -- Darker fg (line numbers, fold columns)
185+
186+
sel0 = alpha(C(pal.accent.fg), 0.30), -- Visual selection bg
187+
sel1 = alpha(C(pal.accent.muted), 0.90), -- Popup sel bg
188+
sel2 = alpha(C(pal.scale.yellow[1]), 0.20), -- Search bg
189189
}
190190

191191
spec.syntax = {
192-
bracket = pal.scale.orange[3], -- Brackets and Punctuation
193-
builtin0 = pal.scale.red[4], -- Builtin variable (Return Keywords, Regex, etc.)
194-
builtin1 = pal.scale.red[4], -- Builtin type
195-
builtin2 = pal.scale.blue[3], -- Builtin const
196-
comment = pal.scale.gray[5], -- Comment
197-
conditional = pal.scale.red[4], -- Conditional and loop
198-
const = pal.scale.blue[3], -- Constants, imports and booleans
199-
dep = pal.scale.red[3], -- Deprecated
200-
field = pl.syntax.constant, -- Field
201-
func = pal.scale.purple[2], -- Functions and Titles
202-
ident = pal.scale.blue[3], -- Identifiers
203-
keyword = pal.scale.red[4], -- Keywords
204-
number = pal.scale.blue[3], -- Numbers
205-
operator = pl.syntax.constant, -- Operators
206-
param = spec.fg1, -- Parameters
207-
preproc = pal.scale.red[4], -- PreProc
208-
regex = pal.scale.blue[3], -- Regex
209-
statement = pal.scale.red[4], -- Statements
210-
string = pal.scale.blue[2], -- Strings
211-
type = pl.syntax.variable, -- Types
212-
tag = pal.scale.green[2], -- Tags
213-
variable = spec.fg1, -- Variables
192+
bracket = spec.fg1, -- Brackets and Punctuation
193+
builtin0 = pl.syntax.constant, -- Builtin variable
194+
builtin1 = pl.syntax.keyword, -- Builtin type
195+
builtin2 = pl.syntax.constant, -- Builtin const
196+
comment = pl.syntax.comment, -- Comment
197+
conditional = pl.syntax.keyword, -- Conditional and loop
198+
const = pl.syntax.constant, -- Constants, imports and booleans
199+
dep = pal.scale.red[3], -- Deprecated
200+
field = pl.syntax.constant, -- Field
201+
func = pl.syntax.entity, -- Functions and Titles
202+
ident = spec.fg1, -- Identifiers
203+
keyword = pl.syntax.keyword, -- Keywords
204+
number = pl.syntax.constant, -- Numbers
205+
operator = pl.syntax.constant, -- Operators
206+
param = spec.fg1, -- Parameters
207+
preproc = pl.syntax.keyword, -- PreProc
208+
regex = pl.syntax.string, -- Regex
209+
statement = pl.syntax.keyword, -- Statements
210+
string = pl.syntax.string, -- Strings
211+
type = pl.syntax.variable, -- Types
212+
tag = pl.syntax.entityTag, -- Tags
213+
variable = spec.fg1, -- Variables
214214
}
215215

216216
spec.diag = {

0 commit comments

Comments
 (0)