https://github.com/dod-101/topiary-yuck
Topiary files for foramtting yuck code
https://github.com/dod-101/topiary-yuck
Last synced: 3 months ago
JSON representation
Topiary files for foramtting yuck code
- Host: GitHub
- URL: https://github.com/dod-101/topiary-yuck
- Owner: DOD-101
- License: mit
- Created: 2025-02-23T10:50:16.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2025-02-23T12:39:56.000Z (3 months ago)
- Last Synced: 2025-02-23T13:25:39.448Z (3 months ago)
- Language: Nix
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# topiary-yuck
> Format your yuck files using Topiary
## Usage
Git clone this repo and then point Topiary to it by setting these environment variables:
```sh
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](./flake.nix) 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
```yuck
(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](https://github.com/tweag/topiary) for the Topiary project, enabling this in the first place.
- [Elkowar](https://github.com/elkowar/eww) for his amazing work on eww
- [BlindFS](https://github.com/blindFS/topiary-nushell) for topiary-nushell, providing an example of how to setup something like this## License
This project is license under the [MIT License](LICENSE.txt).