Warp: Configurable Format-on-Save for the Built-In Code Editor

Warp

Warp added a "Format on save" toggle to its Settings > Code page, giving developers control over whether LSP-powered auto-formatting fires on every save in the built-in code editor. Previously, saving always triggered a language server formatting request, producing noisy diffs when the LSP picked up a different formatter than the project enforced. The new setting (code.editor.format_on_save) defaults to enabled, but can be disabled while all other LSP features (hover, go-to-definition, diagnostics) remain active.


Warp Code Editor Gains a Format-on-Save Toggle

Warp has added a configurable format-on-save setting to its built-in code editor, giving developers fine-grained control over when the language server protocol (LSP) fires automatic formatting. The new toggle appears in Settings > Code under the label "Format on save" and maps to the code.editor.format_on_save boolean in settings.toml.

The Problem: LSP Formatter Mismatch Causing Noisy Diffs

Warp's built-in editor surfaces LSP capabilities including hover documentation, go-to-definition, inline diagnostics, and auto-formatting. The formatting step runs automatically on every save by invoking the active language server's textDocument/formatting request.

This works well in single-formatter projects, but many codebases rely on opinionated project-level formatters such as Prettier, Black, or rustfmt with project-specific configs. When the LSP's built-in formatter applies different rules than the project-configured tool, every save produces a diff against the project's expected output. For teams with strict CI linters or pre-commit hooks, this means unwanted formatting changes leak into commits, requiring manual reversion.

How the New Setting Works

The code.editor.format_on_save setting is a boolean that defaults to true, preserving existing behavior for developers who want automatic formatting. Setting it to false disables the LSP formatting request on save while leaving all other language server features fully active.

The setting can be toggled in two ways:

  • Via Settings UI: Navigate to Settings > Code and toggle "Format on save" on or off.
  • Via settings.toml: Add code.editor.format_on_save = false to disable it programmatically, which is useful for sharing the preference across a team via a dotfiles repository.

Who Benefits

The setting is most valuable in three scenarios:

  • Polyglot repositories where different languages use different formatters and the LSP's default formatter conflicts with project tooling.
  • Strict CI linting pipelines where any formatter deviation causes a pipeline failure, making LSP auto-formatting an active liability.
  • Shared codebases where formatting is enforced via pre-commit hooks (e.g., lint-staged with Prettier), and in-editor formatting would cause double-formatting.

Supported Languages

Warp's LSP-powered code editor supports format-on-save for all languages with active language servers, including Rust (via rust-analyzer), Go (gopls), Python (pylsp / pyright), TypeScript and JavaScript (ts-ls), and C/C++ (clangd). The new toggle applies uniformly across all supported languages.


Mentioned onGitHubGitHub