mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-27 12:54:42 +00:00
Collapse variant and type into the same color
This commit is contained in:
parent
fcf13b44fb
commit
95cb9ceac9
3 changed files with 5 additions and 18 deletions
|
@ -27,17 +27,8 @@
|
||||||
|
|
||||||
; Identifier conventions
|
; Identifier conventions
|
||||||
|
|
||||||
; Assume uppercase names are enum constructors
|
; Assume uppercase names are types/enum-constructors
|
||||||
((identifier) @variant
|
((identifier) @type
|
||||||
(#match? @variant "^[A-Z]"))
|
|
||||||
|
|
||||||
; Assume that uppercase names in paths are types
|
|
||||||
((scoped_identifier
|
|
||||||
path: (identifier) @type)
|
|
||||||
(#match? @type "^[A-Z]"))
|
|
||||||
((scoped_identifier
|
|
||||||
path: (scoped_identifier
|
|
||||||
name: (identifier) @type))
|
|
||||||
(#match? @type "^[A-Z]"))
|
(#match? @type "^[A-Z]"))
|
||||||
|
|
||||||
; Assume all-caps names are constants
|
; Assume all-caps names are constants
|
||||||
|
|
|
@ -214,15 +214,11 @@ export function createTheme(
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
},
|
},
|
||||||
constructor: {
|
constructor: {
|
||||||
color: sample(ramps.blue, 0.5),
|
color: sample(ramps.cyan, 0.5),
|
||||||
weight: fontWeights.normal,
|
|
||||||
},
|
|
||||||
variant: {
|
|
||||||
color: sample(ramps.blue, 0.5),
|
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
},
|
},
|
||||||
property: {
|
property: {
|
||||||
color: sample(ramps.blue, 0.5),
|
color: sample(ramps.blue, 0.6),
|
||||||
weight: fontWeights.normal,
|
weight: fontWeights.normal,
|
||||||
},
|
},
|
||||||
enum: {
|
enum: {
|
||||||
|
|
|
@ -43,7 +43,7 @@ export interface Syntax {
|
||||||
keyword: SyntaxHighlightStyle;
|
keyword: SyntaxHighlightStyle;
|
||||||
function: SyntaxHighlightStyle;
|
function: SyntaxHighlightStyle;
|
||||||
type: SyntaxHighlightStyle;
|
type: SyntaxHighlightStyle;
|
||||||
variant: SyntaxHighlightStyle;
|
constructor: SyntaxHighlightStyle;
|
||||||
property: SyntaxHighlightStyle;
|
property: SyntaxHighlightStyle;
|
||||||
enum: SyntaxHighlightStyle;
|
enum: SyntaxHighlightStyle;
|
||||||
operator: SyntaxHighlightStyle;
|
operator: SyntaxHighlightStyle;
|
||||||
|
|
Loading…
Reference in a new issue