Skip to content

Commit c544096

Browse files
committed
improve JSX intrinsic element highlighting
Also highlights parameters and JSX attributes
1 parent 92e437d commit c544096

File tree

3 files changed

+30
-14
lines changed

3 files changed

+30
-14
lines changed

package-lock.json

Lines changed: 19 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"@replit/codemirror-vim": "^6.3.0",
4444
"@rescript/react": "^0.14.0-rc.1",
4545
"@rescript/webapi": "^0.1.0-experimental-29db5f4",
46-
"@tsnobip/rescript-lezer": "^0.3.0",
46+
"@tsnobip/rescript-lezer": "^0.4.0",
4747
"docson": "^2.1.0",
4848
"fuse.js": "^6.4.3",
4949
"glob": "^7.1.4",

src/components/CodeMirror.res

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,10 +409,9 @@ module CM6 = {
409409
tag: [
410410
Tags.variableName,
411411
Tags.definition(Tags.propertyName),
412-
Tags.tagName,
413412
Tags.labelName,
414-
Tags.definition(Tags.variableName),
415413
Tags.definition(Tags.typeName),
414+
Tags.special(Tags.angleBracket),
416415
],
417416
class: "text-gray-30",
418417
},
@@ -433,9 +432,17 @@ module CM6 = {
433432
class: "text-orange",
434433
},
435434
{
436-
tag: [Tags.namespace, Tags.annotation],
435+
tag: [Tags.namespace],
437436
class: "text-water-dark",
438437
},
438+
{
439+
tag: [Tags.annotation, Tags.tagName],
440+
class: "text-ocean-dark",
441+
},
442+
{
443+
tag: [Tags.attributeName, Tags.labelName, Tags.definition(Tags.variableName)],
444+
color: "#bcc9ab",
445+
},
439446
])
440447
}
441448

0 commit comments

Comments
 (0)