Skip to content

Caret positioning when auto-formatting #3179

@paintparty

Description

@paintparty
VSC version 1.116.0(universal)
Calva version used: v2.0.574
clojure-lsp version used: 2026.04.15-12.53.12-nightly
clj-kondo version used: 2026.04.15

Noticed this recently, seems like a regression, maybe something in the paredit or cljfmt layer?
Thanks!

;; The "|" char represents the postition of the caret

(if foo
  (and bar
       baz) | )

;; after pressing Enter

(if foo
  (and bar
       baz)
  )|


;; This, however, works correctly
(if foo
  (and bar baz) | )

;; after pressing Enter

(if foo
  (and bar baz)
 |)

Two screen recordings, first one is bug, second is expected behavior:

Image Image

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