-
-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EDN lists indented function style #610
Labels
Comments
Yeah, that's a good point. Right now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
When editing an EDN buffer (file ending .edn), clojure mode should treat all paren forms as lists rather than functions, since EDN is a data format.
Thus if you choose to format a list with, say, key-value style pairs, default indentation should Just Work, like for vectors:
Actual behavior
EDN buffers are treated like Clojure code. Though this is mostly correct, it indents list contents like function calls rather than lists when each line contains more than 1 item:
I don't see any configuration vars to change this behavior. There are options for functional indent style, but no buffer-local way to redefine what is classified as a function (that I can see). All the function indent styles will keep the keys from lining up as they would in a vector, map, etc.
Steps to reproduce the problem
Find new file, /tmp/foo.edn. Type one of the above forms.
Workaround
I work around this by redefining a function in my init.el. Only the
string-match
clause in theor
is new:Environment & Version information
clojure-mode version
Emacs version
GNU Emacs 27.2 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.30, cairo version 1.17.4)
of 2021-08-07
The text was updated successfully, but these errors were encountered: