wenkokke / talonfmt

Formatter for Talon files.
MIT License
6 stars 3 forks source link

Formatting breaks parrot() commands #62

Open fidgetingbits opened 1 year ago

fidgetingbits commented 1 year ago

If you want to use a parrot noise you need something like this parrot(tut): key("ctrl-j"). If you run talonfmt across a file with that line it will change it to parrot (tut): key("ctrl-j") which talon doesn't like and will prevent the parrot command from working.

❯ ./talonfmt --version
talonfmt, version 1.9.0
❯ echo "parrot(tut): test" | ./talonfmt
parrot (tut):
    test
wenkokke commented 1 year ago

talonfmt doesn’t support parrot() commands at the moment, since they’re not a part of the public syntax for Talon script. My suggestion is to add parrot() commands to a specific parrot_integration.talon and exclude this file from, e.g., your pre-commit setup.

fidgetingbits commented 1 year ago

Ok thanks. fwiw I have parrot stuff sprinkled in various contexts that don't suit a single file. I also have talonfmt setup as an auto-formatter whenever I save talon files in vim, so not only using it for pre-commit, thus a bit more annoying to filter out files. But I can work around it anyway.

wenkokke commented 1 year ago

If I have the time, I'll eventually add in suppory for parrot and the various other special commands.