Skip to content

v0.1.0

Choose a tag to compare

@pankgeorg pankgeorg released this 08 Nov 20:17
· 1 commit to main since this release
15b0d96

Install (Node ^22.23.3 or ^24.22.1, Prettier 3):

npm install --save-dev prettier https://github.com/pankgeorg/prettier-plugin-julia/releases/download/v0.1.0/prettier-plugin-julia-0.1.0.tgz

then .prettierrc: { "plugins": ["prettier-plugin-julia"] } and npx prettier --write "**/*.jl". CLI, GitHub Actions, pre-commit and editor setup: docs/usage.md.

First release, distributed as a GitHub release tarball (not on npm yet).

Added

  • Prettier 3 plugin for Julia (.jl): language registration, the julia parser, and a
    printer built on JuliaSyntax (from Julia 1.13.2) compiled to WebAssembly. No Julia
    installation needed.
  • Style close to Runic and JuliaFormatter: 4-space indent, 92 columns, spaces around binary
    operators except : and ^, f(x; k=1) keyword arguments, one element per line with a
    trailing comma when a list doesn't fit, unindented module bodies, for i in.
  • Safety check: every output is parsed again and compared with the input in a strict
    normal form; code whose meaning would change is kept as written and reported. Options
    juliaVerify and juliaReport.
  • # prettier-ignore and #! format: off / #! format: on.
  • ```julia / ```jl blocks in Markdown, formatted with 4-space indent
    and 92 columns.
  • Usage guide for the CLI, GitHub Actions, lint-staged, pre-commit and VS Code
    (docs/usage.md).

Tested on 25,174 real-world Julia files: all valid files formatted and verified, no region
kept as written, formatting is idempotent.