Skip to content

[formatting] Raise default width to 100 columns - #637

Merged
purefunctor merged 1 commit into
mainfrom
formatting-default-width
Oct 8, 2026
Merged

purefunctor merged 1 commit into
mainfrom
formatting-default-width

Conversation

@purefunctor

Copy link
Copy Markdown
Owner

Raises the formatter's default line width from 80 to 100 columns.

Why: 80 columns is narrower than modern editors and terminals comfortably support, so default-formatted output wraps more aggressively than most users want. 100 keeps lines readable while reducing forced breaks.

Approach: changes the single default in formatting::Config::default, which the CLI (--width fallback) and the language server (lineWidth fallback) both inherit. Help text, the formatting guide, and the two affected snapshots are updated; all other fixtures either pin an explicit width or already fit, so output is unchanged for them.

Verification: cargo check -p formatting --tests, -p iris-cli, -p iris-lsp-workspace; just t formatting, just t docs, just t lsp (no pending snapshots); E2E formatting + lsp suites (25 tests) and the CLI help snapshot test pass; just format and git diff --check clean.

Thread: https://ampcode.com/threads/T-01a11720-fd70-73ae-a723-70ad4084ac5b

@purefunctor

purefunctor Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Granite Review

Council

Role Mode Status Attempt Amp thread
Council member review-gpt-6-luna completed 1 T-01a118dc-2fa9-75af-bdde-3921b1b7e9f7
Council member review-gpt-6-sol completed 1 T-01a118dc-308f-723e-9707-7613e505fac1
Synthesis review-astra-synthesis completed 1 T-01a118f8-af24-764c-b326-f8c71865ae1d

Findings

No actionable findings.

Open this run in Granite

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Compatibility regression report

Package set 81.3.0 for PureScript 0.15.15.

✅ The candidate introduces no compatibility errors.

Diagnostic class Base Candidate Introduced Fixed
Compiler errors 0 0 0 0
Compiler warnings 36 36 0 0
Verifier errors 0 0 0 0

Introduced errors

None.

Fixed errors (0)

None.

Warning changes (0 introduced, 0 fixed)

Introduced

None.

Fixed

None.

Candidate errors (0)

None.

Candidate warnings (36)
  • deno@0.0.5/src/Deno.purs:38:17 — CustomWarning (checking): Data.Map's `Semigroup` instance is now unbiased and differs from the left-biased instance defined in PureScript releases <= 0.13.x.
  • deno@0.0.5/src/Deno/Dotenv.purs:41:20 — CustomWarning (checking) × 2: Data.Map's `Semigroup` instance is now unbiased and differs from the left-biased instance defined in PureScript releases <= 0.13.x.
  • deno@0.0.5/src/Deno/Http/Request.purs:47:25 — CustomWarning (checking): Data.Map's `Semigroup` instance is now unbiased and differs from the left-biased instance defined in PureScript releases <= 0.13.x.
  • literals@1.0.2/src/Literals/Null.purs:11:1 — UnparseableFFIModule (javascript): Oxc could not parse the JavaScript FFI module. Fix the invalid or unsupported JavaScript syntax; Iris treated the module as opaque and skipped export-name validation: Unexpected token
  • react-basic-dom-beta@0.1.1/src/Beta/DOM.purs:33:31 — DuplicateImport (indexing): Import list contains multiple references to 'Proxy'
  • sparse-polynomials@3.0.1/src/Data/Sparse/Polynomial.purs:1048:1 — MissingPatterns (checking) × 2: Pattern match is not exhaustive. Missing: _
  • text-formatting@0.1.0/src/Data/Text/Format/Dodo/Printer.purs:64:25 — CustomWarning (checking) × 23: Debug function usage
  • trivial-unfold@0.5.0/src/Data/Unfoldable1/Trivial1.purs:150:17 — MissingPatterns (checking): Pattern match is not exhaustive. Missing: Right _
  • xterm@1.0.0/src/XTerm/UnicodeHandling.purs:15:1 — UnparseableFFIModule (javascript) × 2: Oxc could not parse the JavaScript FFI module. Fix the invalid or unsupported JavaScript syntax; Iris treated the module as opaque and skipped export-name validation: Expected a semicolon or an implicit semicolon after a statement, but found none
  • yoga-react-dom@2.0.1/src/Yoga/React/DOM.purs:34:31 — DuplicateImport (indexing): Import list contains multiple references to 'Proxy'
  • yoga-tree-utils@1.0.0/src/Yoga/Tree/Extended/Path.purs:20:72 — DuplicateImport (indexing): Import list contains multiple references to 'snoc'

View workflow run

@claude

claude Bot commented Oct 8, 2026

Copy link
Copy Markdown

Review against AGENTS.md: no issues found.

The default lives in formatting::Config::default, which is the layer that owns it, and both the CLI (--width) and the LSP (lineWidth) fall back to it. The two snapshot changes, the CLI help and the invalid_formatting_options report, now show the new default as intended. The assertion_line change matches where the harness asserts the snapshot now, so the snapshot was regenerated, not edited by hand. I found no other places in the docs or editor config that still say the default is 80; the remaining 80s are explicit @format width=80 pins in fixtures, or hover and progress widths that have nothing to do with the formatter.

Checks run:

  • cargo check -p formatting --tests: passed
  • cargo check -p iris-cli -p iris-lsp-workspace --tests: passed
  • cargo nextest run -p formatting: no unit tests in the crate
  • just t formatting: all passed, no pending snapshots
  • just format --check: clean
  • just licenses, then git status: THIRDPARTY.toml unchanged, working tree clean, no .snap.new files
  • E2E (cli__help_format, formatting suite): not run here. The pinned Spago tooling (just e2e-prepare) isn't installed in this environment, so these rely on the Cargo Build & Test workflow.

@purefunctor
purefunctor merged commit 740a840 into main Oct 8, 2026
44 checks passed
@purefunctor
purefunctor deleted the formatting-default-width branch October 8, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant