1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-12 14:28:08 +03:00
juvix/app
Paul Cadman 7840f9fa79
Always print source of formatted file unless --check is specified (#2205)
This PR was already merged in https://github.com/anoma/juvix/pull/2173,
but main was subsequently forced pushed as part of the 0.4.0 release and
these changes were erased by mistake.

This PR changes the behaviour of the formatter when run on files that
are already formatted. Previously the source of a file that was already
formatted was not output by the formatter.

After this PR, the formatter always outputs the contents of a formatted
file (when used on a single file, and if the --check option is not
specified).

If the `format: false` pragma is set then the source is echoed verbatim,
without highlighting (because it's not possible to get the highlighting
without the formatting).

This probably helps implementing the formatter in the vscode extension,
see https://github.com/anoma/vscode-juvix/issues/98
2023-06-19 15:14:59 +01:00
..
Commands Always print source of formatted file unless --check is specified (#2205) 2023-06-19 15:14:59 +01:00
TopCommand Always print source of formatted file unless --check is specified (#2205) 2023-06-19 15:14:59 +01:00
App.hs Add main field to juvix.yaml (#2120) 2023-05-24 15:42:20 +02:00
AsmInterpreter.hs Refactor Core datastructures (#1975) 2023-04-04 18:58:05 +02:00
CommonOptions.hs Support more paths (#2000) 2023-04-19 15:56:48 +01:00
Evaluator.hs Print values in juvix eval (#2179) 2023-06-06 12:35:01 +02:00
GlobalOptions.hs Remove --no-format option (#2121) 2023-05-24 10:46:18 +02:00
Main.hs Improve error message when input path doesn't exist (#2092) 2023-05-15 11:03:09 +02:00
TopCommand.hs Add juvix clean to remove project build artifact directory (#2018) 2023-04-21 14:21:31 +02:00