Apply a kind of syntax highlighting to yaml files
Categories
(Webtools :: Searchfox, enhancement)
Tracking
(Not tracked)
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
We already support indexing StaticPrefs.yaml, but we don't apply any syntax highlighting, given yaml doesn't have any reserved words.
but given that it has similar looking as CSS, it would be nice to apply color to the keys, and also do the same for other yaml files.
I've looked into some yaml files, but there's no good example for linkification.
the task definition yaml files have script paths, but they are relative path from random subdirectories for each value,
so there's no easy way to linkify them.
thus I'm going to focus just a highlighting here.
Comment 1•9 months ago
•
|
||
Although a bunch of the hyperblame stuff is still WIP, the cst_tokenizer.rs did land and could potentially form the basis of a tree-sitter-based tokenizer. It's what generates main%40big_cpp.cpp__tokenize__file.snap. Bug 1796870 tracks the generic tokenizer support. That said, I see no problem in following our current tokenizing approach for yaml, and to properly set expectations, I am unlikely to be able to do meaningful searchfox enhancement hobby stuff before mid-late December, and even then that might be optimistic, so it's not like there's any risk of contention on this.
| Assignee | ||
Comment 2•9 months ago
|
||
Thank you for the references.
Supporting bug 1879185 at the same time would be reasonable.
I'll look into it.
| Assignee | ||
Comment 3•9 months ago
|
||
Adding a nesting range to each key automatically applies highlighting.
I'll fix them at once.
| Assignee | ||
Comment 4•9 months ago
|
||
| Assignee | ||
Updated•9 months ago
|
Description
•