Skip to content

DOD-101/topiary-yuck

Repository files navigation

topiary-yuck

Format your yuck files using Topiary

Usage

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/"

Using nix

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.

Formatting style

(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.

Acknowledgements

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

License

This project is license under the MIT License.

About

Topiary files for foramtting yuck code

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors