Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Fix Tree-Sitter JavaScript highlighting for JSX file #104

Merged
merged 1 commit into from
Nov 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions styles/syntax/_base.less
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
color: @green;
}

.syntax--meta.syntax--class {
color: @blue;
}

.syntax--entity {
&.syntax--name {
&.syntax--class,
Expand Down
55 changes: 28 additions & 27 deletions styles/syntax/javascript.less
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
.syntax--source.syntax--js {
.syntax--constant {
color: @green;
}

.syntax--comma {
color: @syntax-text-color;
}

.syntax--support.syntax--class {
color: @green;
}

.syntax--entity.syntax--name.syntax--type {
color: @yellow;
}
.syntax--entity.syntax--name {
color: @syntax-text-color;

.syntax--entity {
&.syntax--name.syntax--type {
color: @yellow;
}
&.syntax--name {
color: @syntax-text-color;

&.syntax--function {
color: @blue;
}
}

&.syntax--name.syntax--tag {
color: @blue;
}

&.syntax--other.syntax--attribute-name {
color: @yellow;
}
}


.syntax--meta.syntax--brace {
color: @syntax-text-color;
}
Expand All @@ -29,7 +40,7 @@
color: @green;
}
.syntax--keyword.syntax--control {
color: @green;
color: @orange;
}
.syntax--keyword.syntax--control.syntax--regexp {
color: @cyan;
Expand Down Expand Up @@ -64,12 +75,9 @@
.syntax--support.syntax--constant {
color: @syntax-text-color;
}
.syntax--storage {
color: @blue;
}

.syntax--constant.syntax--numeric {
color: @syntax-text-color;

.syntax--storage.syntax--modifier {
color: @yellow;
}

.syntax--punctuation.syntax--terminator.syntax--statement {
Expand All @@ -85,10 +93,7 @@
.syntax--meta.syntax--brace.syntax--curly {
color: @blue;
}
.syntax--definition.syntax--begin.syntax--curly,
.syntax--definition.syntax--end.syntax--curly {
color: @blue;
}

.syntax--string.syntax--quoted.syntax--template {
.syntax--embedded.syntax--source {
color: @syntax-text-color;
Expand All @@ -97,6 +102,7 @@
}
}
}

&.syntax--embedded .syntax--entity.syntax--name.syntax--tag {
color: @blue;
}
Expand All @@ -106,9 +112,4 @@
color: @orange;
}
}
}
.syntax--source.syntax--js.syntax--jsx {
.syntax--entity.syntax--name.syntax--tag {
color: @blue;
}
}
}