| Age | Commit message (Collapse) | Author |
|
Seems fairly straightforward to me, Terraform is no longer open-source,
OpenTofu is the compatible open-source successor, similar to the
Redis/Valkey situation.
Of course, if someone still prefers to use Terraform instead, they can
easily customize using:
```tf
(setf (alist-get 'terraform-mode apheleia-mode-alist) 'terraform)
```
We don't have a mechanism for allowing multiple formatters to be
registered for the same major mode, where later ones could be used if
earlier ones are not installed. That might be a nice addition.
|
|
The --no-doc argument removes existing document separators (---) from
yaml files. It is perfectly valid and common practice to use multiple
documents within a single file, e.g. in the kubernetes universe.
Formatting such files with --no-doc breaks their validity.
See also the prettier-yaml test, which preserves the document separator,
too.
|
|
## Summary
- Add oxfmt (Oxc Formatter) as a new formatter option for JavaScript and
TypeScript files
## Details
[Oxfmt](https://oxc.rs/docs/guide/usage/formatter) is a Rust-powered,
Prettier-compatible code formatter from the Oxc project. It's currently
in alpha but offers significant performance improvements (30x+ faster
than Prettier).
Key points:
- Uses `inplace` mode since oxfmt doesn't support stdin/stdout
- Works with all common JS/TS extensions (.js, .jsx, .mjs, .cjs, .ts,
.tsx, .mts)
- Not added to `apheleia-mode-alist` - users can opt-in by setting
`apheleia-formatter` to `oxfmt`
- Defaults are already sensible: 2-space indent, printWidth 100, no tabs
Example usage:
```elisp
(setf (alist-get 'oxfmt apheleia-formatters)
'("apheleia-npx" "oxfmt" inplace))
;; To use for JS/TS files:
(setq-default apheleia-formatter 'oxfmt)
;; Or per-mode:
(setf (alist-get 'typescript-ts-mode apheleia-mode-alist) 'oxfmt)
```
|
|
This make rubocop obey exclusions from config files. Otherwise, even if
a file is excluded from in .rubocop.yml, apheleia will still format it.
See
https://docs.rubocop.org/rubocop/usage/basic_usage.html#command-line-flags
|
|
The shfmt formatter produced an invalid command invocation. The symptom
was an error: `eval: Invalid function: "-i"`
I couldn't figure out how to splice the list in correctly but
`--indent=` can be passed as one argument.
---------
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
|
|
Add support for `bibtex-mode` using emacs native function
`bibtex-reformat`.
|
|
Hi! My first time adding a formatter, please let me know if I missed
anything.
Some things I'm unclear about:
1. How to fail gracefully when [styleR](https://styler.r-lib.org/)
package is absent from the system
2. Whether the formatter should be named `ess-r` or something more
general like `rlang`
## Test case
FYI, there are loads of tests to pick from on
https://github.com/r-lib/styler/tree/main/tests/testthat.
I picked
[unindention/mixed-in.R](https://github.com/r-lib/styler/blob/main/tests/testthat/unindention/mixed-in.R),
but oddly, the output
[unindention/mixed-out.R](https://github.com/r-lib/styler/blob/main/tests/testthat/unindention/mixed-out.R)
isn't quite the same as we got!
I don't know if that's an upstream issue, or that upstream changed style
since that test was written, or that perhaps the file is meant to be
concatenated into something else.
|
|
Taplo is a very popular formatter and linter for TOML.
https://github.com/tamasfe/taplo
|
|
Unfortunately, I have to write some C#
|
|
|
|
This is a more specific formatter than `hclfmt` for nomad files.
|
|
Add support for [cljstyle](https://github.com/greglook/cljstyle)
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
|
|
Add
[gdformat](https://github.com/Scony/godot-gdscript-toolkit?tab=readme-ov-file#formatting-with-gdformat-more)
for godot gdscript files
See
- https://godotengine.org/
-
https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_basics.html
- https://github.com/Scony/godot-gdscript-toolkit
---------
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
|
|
Adds a new formatter for prettier `prettier-json-stringify` which uses
prettier `json-stringify` parser. `json-stringify` parser is used by
prettier for formatting package.json files
|
|
See https://biomejs.dev/
Alternative formatter to `prettier`
closes https://github.com/radian-software/apheleia/issues/323
|
|
https://github.com/vlang/v
---------
Co-authored-by: Raphael Nahoum <raphaelnahoum@Flrians-MBP.localdomain>
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
|
|
support gleam language
---------
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
|
|
Add support for the zig programming language using `zig fmt` for
`zig-mode` and `zig-ts-mode`.
---------
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
|
|
https://github.com/snakemake/snakefmt
---------
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
|
|
ocp-indent allows indenting even partially compiling OCaml code, while
ocamlformat requires the code to compile correctly. Also, Doom Emacs
uses ocp-indent when ocamlformat's configuration file is not found, and
not having an ocp-indent formatter gives an error.
<!--
To expedite the pull request process, please see the contributor guide
for my projects:
<https://github.com/raxod502/contributor-guide>
-->
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
|
|
Formatter for typst
https://github.com/Enter-tainer/typstyle
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
|
|
* `apheleia-npx` would use an incorrect path for the Yarn PnP ESM
loader.
* `apheleia-npx` did not correctly guard against word splitting.
* `apheleia-npx` was sometimes not able to find formatters in a Yarn PnP
project if there was also a node_modules folder at the root of the
project. Unfortunately, many tools (including
[Prettier](https://github.com/prettier/prettier/issues/13032)) will
create a cache folder in `node_modules` even in Yarn PnP projects. The
presence of any `node_modules` folders are irrelevant when a `.pnp.cjs`
file is present.
---------
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
|
|
Adds a new formatter `dhall-format` used for
[dhall](https://dhall-lang.org/).
---------
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
|
|
Hi,
pyang (https://github.com/mbj4668/pyang) is a YANG validator,
transformator and code generator, written in python. YANG (RFC 7950) is
a data modeling language for NETCONF (RFC 6241), developed by the IETF
NETMOD WG. This formatter provides support for Emacs yang-mode.
---------
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
|
|
`ruff` doesn't run isort as part of its format, so to maintain parity
with the sort rules that black/isort offer, this is the ruff isort.
---------
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
|
|
This formatter is formatting via
[treefmt](https://numtide.github.io/treefmt). This is useful if the
project is configuring formatters for the project and you don't have to
replicate this logic within Emacs, but instead utilize treefmt directly.
To do that you can set the `apheleia-formatter` to `treefmt` within the
projects `.dir-locals.el`.
I noticed there are tests for this, since treefmt could technically
format anything, I went with treefmt formatting rust code. It also
relies on having a `treefmt.toml` in the project folder, so had to add
that as well in the tests.
|
|
Add [ruby-syntax-tree](https://github.com/ruby-syntax-tree/syntax_tree)
as an available formatter. Include support for finding a [`.streerc`
file](https://github.com/ruby-syntax-tree/syntax_tree#configuration).
---------
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
|
|
Add [docformatter](https://github.com/PyCQA/docformatter) for Python
docstrings.
By default it outputs diffs but changes in-place with `--in-place`. On
successful change it exits with an error code of `3` (found out by
trial), so I had to add a formatter wrapping-script.
Initially I used `--in-place` with the special `in-place` symbol in
apheleia. But now I tried an approach where I transform the diff into
usable stdout using `patch` instead.
Related to #266 , where I had used the example of docformatter to ask
how to add scripts with positive exit codes and @raxod502 showed me the
`phpcs` solution.
---------
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
|
|
https://dprint.dev
---------
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
|
|
https://docs.python.org/3/library/json.html#module-json.tool
|
|
|
|
|
|
|
|
|
|
Add support for [`pgFormatter`](https://github.com/darold/pgFormatter)
for `sql-mode`.
<!--
To expedite the pull request process, please see the contributor guide
for my projects:
<https://github.com/raxod502/contributor-guide>
-->
|
|
|
|
<!--
To expedite the pull request process, please see the contributor guide
for my projects:
<https://github.com/raxod502/contributor-guide>
-->
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
|
|
<!--
To expedite the pull request process, please see the contributor guide
for my projects:
<https://github.com/raxod502/contributor-guide>
-->
|
|
This also fixes a few test installers:
- rustfmt is available via apt-get in 22.04, use that instead of tarball
that's no longer available
- brittany now installs cleanly in the default haskell ghc/cabal in
22.04, so just use that
- perltidy in 22.04 has slightly different output
- nixfmt download url changed (now includes OS/arch). There was
initially no binary available when nixfmt was updated,
but the devs there were kind enough to provide one:
https://github.com/serokell/nixfmt/issues/139
This runs a full `make fmt-build` without errors, though it takes a
while ;). All tests pass, too.
|
|
This adds support, but does not make it the default
Fixes: #233
---------
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
|
|
Add formatter `hclfmt` for Hashicorp Configuration Langauge (HCL).
|
|
Found while trying to `make fmt-build` that the installer for `brittany`
was broken, and couldn't fix it.
This removes brittany, and adds the ormolu and fourmolu formatters for
haskell, and sets ormolu as the default for haskell-mode.
---------
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
|
|
There are *so many* opinionated no-config ruby formatters ;)
|
|
<!--
To expedite the pull request process, please see the contributor guide
for my projects:
<https://github.com/raxod502/contributor-guide>
-->
|
|
|
|
|
|
|
|
|
|
|
|
|