diff options
| author | Derek Passen <dpassen1@gmail.com> | 2025-06-11 18:51:21 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-11 15:51:21 -0700 |
| commit | f3308f53d3fd15b808abc583fa4c50a197f0d1e9 (patch) | |
| tree | 6525706cd6f6a179948f6562ac126ef2c445c923 | |
| parent | 7eaaf3f45703d49e494f6dd0555633cf6b355817 (diff) | |
Add support for `hurlfmt` to format `hurl` files (#365)
| -rw-r--r-- | CHANGELOG.md | 3 | ||||
| -rw-r--r-- | apheleia-formatters.el | 2 | ||||
| -rw-r--r-- | test/formatters/installers/hurlfmt.bash | 2 | ||||
| -rw-r--r-- | test/formatters/samplecode/hurlfmt/in.hurl | 8 | ||||
| -rw-r--r-- | test/formatters/samplecode/hurlfmt/out.hurl | 8 |
5 files changed, 23 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index c09323b..8a63b0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ The format is based on [Keep a Changelog]. ### Bugs fixed * A formatter that adds indentation while point is at the end of the line would sometimes leave point at the wrong position ([#362]). +### Formatters +* [hurlfmt](https://hurl.dev) + for hurl files. ## 4.4.1 (released 2025-05-13) ### Enhancements diff --git a/apheleia-formatters.el b/apheleia-formatters.el index c49c18e..4485a38 100644 --- a/apheleia-formatters.el +++ b/apheleia-formatters.el @@ -92,6 +92,7 @@ (apheleia-formatters-indent "--indent-with-tabs" "--indent-spaces") (apheleia-formatters-fill-column "-wrap")) + (hurlfmt . ("hurlfmt" "--no-color")) (isort . ("isort" "-")) (js-beautify "js-beautify" "--file" "-" "--end-with-newline" (apheleia-formatters-indent @@ -349,6 +350,7 @@ rather than using this system." (hcl-mode . hclfmt) (html-mode . prettier-html) (html-ts-mode . prettier-html) + (hurl-mode . hurlfmt) (java-mode . google-java-format) (java-ts-mode . google-java-format) (jinja2-mode . nil) diff --git a/test/formatters/installers/hurlfmt.bash b/test/formatters/installers/hurlfmt.bash new file mode 100644 index 0000000..002da58 --- /dev/null +++ b/test/formatters/installers/hurlfmt.bash @@ -0,0 +1,2 @@ +sudo apt-add-repository -y ppa:lepapareil/hurl +sudo apt-get install hurl diff --git a/test/formatters/samplecode/hurlfmt/in.hurl b/test/formatters/samplecode/hurlfmt/in.hurl new file mode 100644 index 0000000..bbd70c6 --- /dev/null +++ b/test/formatters/samplecode/hurlfmt/in.hurl @@ -0,0 +1,8 @@ + GET https://example.org/news + +[Query] + order: newest + search: something to search + count: 100 + + HTTP 200 diff --git a/test/formatters/samplecode/hurlfmt/out.hurl b/test/formatters/samplecode/hurlfmt/out.hurl new file mode 100644 index 0000000..4bc7be7 --- /dev/null +++ b/test/formatters/samplecode/hurlfmt/out.hurl @@ -0,0 +1,8 @@ +GET https://example.org/news + +[Query] +order: newest +search: something to search +count: 100 + +HTTP 200 |
