Closed greenfork closed 3 years ago
I see the same sort of thing.
I don't know how the coloring works, but agree that one of the two ideas you suggested make more sense than the current arrangement.
Ok, here's a patch for not coloring the @
, but rather just the delimiters:
diff --git a/freja/rainbow.janet b/freja/rainbow.janet
index 2fb1ab3..4a90769 100644
--- a/freja/rainbow.janet
+++ b/freja/rainbow.janet
@@ -184,7 +184,7 @@
# (any :input)
# (choice ")"
# (error (constant "missing )"))))
- (* (cmt (* ($) "@(") ,inc-depth) (any :input) (opt (cmt (* ($) ")") ,dec-depth)))
+ (* (cmt (* "@" ($) "(") ,inc-depth) (any :input) (opt (cmt (* ($) ")") ,dec-depth)))
#
:tuple #(sequence "("
@@ -197,7 +197,7 @@
# (any :input)
# (choice "]"
# (error (constant "missing ]"))))
- (* (cmt (* ($) "@[") ,inc-depth) (any :input) (opt (cmt (* ($) "]") ,dec-depth)))
+ (* (cmt (* "@" ($) "[") ,inc-depth) (any :input) (opt (cmt (* ($) "]") ,dec-depth)))
#
:bracket-tuple #(sequence "["
# (any :input)
@@ -209,7 +209,7 @@
# (any :input)
# (choice "}"
# (error (constant "missing }"))))
- (* (cmt (* ($) "@{") ,inc-depth) (any :input) (opt (cmt (* ($) "}") ,dec-depth)))
+ (* (cmt (* "@" ($) "{") ,inc-depth) (any :input) (opt (cmt (* ($) "}") ,dec-depth)))
#
:struct #(sequence "{"
# (any :input)
@saikyun How does this look?
Merged PRs, thanks!
I think this highlighting should be different for
@{}
Either everything is colored or the
@
sign is not colored