Skip to content

Fix #610: Treat all paren lists as data in edn-mode - #691

Merged
bbatsov merged 1 commit into
masterfrom
fix-edn-paren-indentation
Feb 20, 2026
Merged

Fix #610: Treat all paren lists as data in edn-mode#691
bbatsov merged 1 commit into
masterfrom
fix-edn-paren-indentation

Conversation

@bbatsov

@bbatsov bbatsov commented Feb 20, 2026

Copy link
Copy Markdown
Member

EDN files have no function calls, so paren lists like (:key1 :value1 :key2 :value2) should use uniform data-style indentation rather than function-call style. This adds a (derived-mode-p 'edn-mode) check to clojure--not-function-form-p so all lists in EDN buffers indent as data.

Fixes #610

@bbatsov
bbatsov force-pushed the fix-edn-paren-indentation branch from c005a35 to 5fc7094 Compare February 20, 2026 08:55
In EDN files there are no function calls, so paren lists like
(:key1 :value1 :key2 :value2) should use data-style indentation
(aligned at column 1 inside the paren) rather than function-call
style indentation.

Add `(derived-mode-p 'edn-mode)` as the first check in
`clojure--not-function-form-p` so that all list forms in EDN
buffers are treated as data.

Also fix indentation of a seq-find call to satisfy the linter.
@bbatsov
bbatsov force-pushed the fix-edn-paren-indentation branch from 5fc7094 to 52782b8 Compare February 20, 2026 08:57
@rrudakov

Copy link
Copy Markdown

I wanted to highlight a specific use case for EDN files regarding
function calls. We use the 'clip' library to describe system
components, which involves embedding function calls directly
within EDN via tagged literals.

Example of the syntax:
https://github.com/juxt/clip?tab=readme-ov-file#use-with-edn

@bbatsov
bbatsov merged commit 500fa26 into master Feb 20, 2026
6 of 7 checks passed
@bbatsov

bbatsov commented Mar 3, 2026

Copy link
Copy Markdown
Member Author

@rrudakov Can you open a new ticket for this, so we can track this properly?

@rrudakov

rrudakov commented Mar 3, 2026

Copy link
Copy Markdown

@rrudakov Can you open a new ticket for this, so we can track this properly?

Done.

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.

EDN lists indented function style

2 participants