prettier-plugin-wolfram weekly downloads statistics
By ToneAr · npm · Prettier plugins
Prettier plugin for Wolfram Language using tree-sitter
prettier-plugin-wolfram has 47 recorded weekly downloads on npm, an increase of 124% over the past 30 days, ranking #2783 of 3,247 tracked listings.
About prettier-plugin-wolfram
The plugin parses Wolfram Language through a bundled tree-sitter WebAssembly
grammar and prints the result with Prettier. It supports .wl, .wls, .wlt,
.mt, and .m files. No Wolfram Engine or local kernel installation is required.
Not affiliated with the original prettier extension.
At A Glance
| Need | What this package provides |
|---|---|
| Prettier formatting | A Wolfram parser and printer for Prettier 3 projects. |
| Editor support | A bundled VS Code extension with document, range, and format-on-save workflows. |
| Diagnostics | Formatter-backed rule findings, line-width hints, and fixable style diffs. |
| Zero dependencies | Parsing via a bundled tree-sitter WASM grammar; no Wolfram Engine required. |
Requirements
- Node.js
- Prettier 3.x
Install
Install Prettier and the plugin in the project that contains your Wolfram source:
npm install --save-dev prettier prettier-plugin-wolfram
Add the plugin to your Prettier configuration for CLI use:
{
"plugins": ["prettier-plugin-wolfram"]
}
CLI Usage
Format a file to stdout:
npx prettier --plugin prettier-plugin-wolfram --parser wolfram file.wl
Write changes back:
npx prettier --plugin prettier-plugin-wolfram --parser wolfram --write file.wl
Check whether files would change:
npx prettier --plugin prettier-plugin-wolfram --parser wolfram --check "src/**/*.wl"
Format a byte range with Prettier's standard range flags:
npx prettier --plugin prettier-plugin-wolfram --parser wolfram --range-start 0 --range-end 200 file.wl
Range formatting expands to the top-level Wolfram expressions touched by the range. This avoids formatting incomplete fragments that the parser cannot parse on their own.
Formatting Features
- Formats Wolfram calls, lists, associations, prefix, postfix, infix, binary, ternary, compound, and leaf nodes produced by the tree-sitter grammar.
- Applies specialized layouts to configurable block-style forms such as
Module,With,Block, andDynamicModule. - Applies condition-first layout to configurable forms such as
IfandSwitch. - Applies alternating condition/body layout to configurable case forms such as
Which. - Wraps long string literals and flattens nested
StringJoin[...]calls into a stable multilineStringJoin[...]layout when needed. - Preserves leading comments, trailing comments, multiline comments, and top-level comment blocks.
- Aligns trailing documentation comments either automatically or at a configured column.
- Preserves ordinary blank lines up to a configured cap and controls spacing
between adjacent definitions, including separate
SetandSetDelayeddefinition groups. - Optionally aligns
RuleandRuleDelayedvalues in multiline argument, list, and association layouts. - Normalizes general infix
x ~ f ~ ytof[x, y]unless the function head is listed inwolfram.preserveTildeInfixFunctions. - Leaves parse-error files and unsupported CST nodes as original source instead of printing internal parser details.
- Produces idempotent output: a second format pass should not change the first pass result.
Prettier Configuration
Typical .prettierrc example:
{
"plugins": ["prettier-plugin-wolfram"],
"printWidth": 80,
"tabWidth": 2,
"wolfram": {
"newlinesBetweenDefinitions": 1,
"newlinesBetweenSameNameDefinitions": 0,
"maxBlankLinesBetweenCode": 1,
"trailingNewline": false,
"spaceAfterComma": true,
"spaceAroundOperators": true,
"alignRuleValues": false,
"logicalOperatorsToFullForm": true,
"documentationCommentColumn": 0,
"documentationCommentPadding": 2,
"documentationCommentMarkers": false,
"topLevelSpacingMode": "declarations",
"preserveTildeInfixFunctions": "",
"moduleVarsBreakThreshold": 40,
"conditionFirstFunctions": "If,Switch",
"blockStructureFunctions": "Module,With,Block,DynamicModule",
"caseStructureFunctions": "Which",
"lintRules": "{}"
}
}
Use Prettier's standard printWidth, tabWidth, useTabs, endOfLine, and
related options for normal Prettier behavior. The options below are specific to
this plugin.…
Description from the npm listing.
- prettier
- prettier-plugin
- wolfram
- wolfram-language
- mathematica
- formatter
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm Prettier plugins plugins
All 20 prettier-plugin-wolfram alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/prettier-plugin-wolfram. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.