CM KCL: highlight property names, labeled args and annotations (#5386)

* CM KCL: highlight property names in objects

* CM KCL: highlight arg labels in fn calls

* CM KCL: highlight annotations

* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)

---------

Co-authored-by: Matt Mundell <matt@mundell.me>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Jonathan Tran
2025-02-19 20:17:18 -05:00
committed by GitHub
parent 2835665a6a
commit 695c432d1e
4 changed files with 4 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 127 KiB

View File

@ -20,10 +20,14 @@ export const kclHighlight = styleTags({
LineComment: t.lineComment,
BlockComment: t.blockComment,
Shebang: t.meta,
AnnotationName: t.annotation,
PipeSubstitution: t.atom,
VariableDefinition: t.definition(t.variableName),
VariableName: t.variableName,
PropertyName: t.propertyName,
'AnnotationProperty/PropertyName': t.definition(t.propertyName),
'ObjectProperty/PropertyName': t.definition(t.propertyName),
'LabeledArgument/ArgumentLabel': t.definition(t.propertyName),
TagDeclarator: t.tagName,
'( )': t.paren,
'{ }': t.brace,