Format your yuck files using Topiary
Git clone this repo and then point Topiary to it by setting these environment variables:
TOPIARY_CONFIG_FILE="path/to/topiary-yuck/languages.ncl"
TOPIARY_LANGUAGES_DIR="path/to/topiary-yuck/languages/"
If you're using nix/NixOS you can use the provided flake to install topiary-yuck
, which just wraps topiary.
This also means that you can still use topiary to format other file types, without any additional config.
(defwidget animalButton [ emoji ]
(box
:class "animalLayout"
(eventbox
:class `animal ${selected == emoji ? "selected" : ""}`
:cursor "pointer"
:onhover "eww update selected=${emoji}"
emoji)))
For more examples check out the ./tests/expected_*.yuck
files.
Special thanks to:
- Tweag for the Topiary project, enabling this in the first place.
- Elkowar for his amazing work on eww
- BlindFS for topiary-nushell, providing an example of how to setup something like this
This project is license under the MIT License.