GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — IntelliJ plugin formats code between formatter off/on marker comments · Issue #215 · openjavaformat/open-java-format

IntelliJ plugin formats code between formatter off/on marker comments #215

New issue
Copy link
New issue
Copy link
Open
Open
IntelliJ plugin formats code between formatter off/on marker comments#215
Copy link

Description

@abashev
abashev
opened on Nov 12, 2026
Issue body actions

Upstream: palantir#1303
Kind: bug | Priority: low

palantir-java-format#1303 (open since May 2025) reports that the IntelliJ plugin reformats code wrapped in the IDE's "formatter off / formatter on" marker comments, even when that option is enabled in the IDE code-style settings. IntelliJ's own formatter honours the markers, so users who switch to the plugin lose a feature they relied on; the reporter's example is a long Spring Security builder chain that is meant to stay hand-laid-out. A new comment (2026-11-11) only points to how spring-javaformat documents the same use case.

Why it matters to us: our IDEA plugin is a fork of the same code. It registers as an external async formatting service, takes the formatting ranges from the IDE request and passes them straight to the formatter (see the range handling in PalantirJavaFormatFormattingService). I found no code in the plugin, or in the core formatter, that looks at marker comments or excludes the regions between them, so the same behaviour should apply to our users. Not verified by running the plugin.

Affected files in our repo: open-java-format-idea-plugin/src/main/java/com/palantir/javaformat/intellij/PalantirJavaFormatFormattingService.java (range computation, toRanges), and possibly the core formatter in open-java-format if the exclusion is implemented there so that CLI, Gradle and native users benefit as well.

Examples: not available - the issue gives only the input code and a description of the wrong result; it does not show what the formatter outputs, and the fix is not in the item.

Suggested action: investigate. Reproduce with our plugin, then decide whether to subtract the marker regions from the requested ranges in the plugin (smallest change) or add marker support to the core formatter. Low priority: the upstream issue has no fix or linked PR, and a workaround exists (select ranges manually).


Filed from an upstream-watch ticket after manual review.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.