Skip to content
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

Don't avoid 1-element vectors/lists #344

Closed
vemv opened this issue Oct 25, 2021 · 2 comments · Fixed by #345
Closed

Don't avoid 1-element vectors/lists #344

vemv opened this issue Oct 25, 2021 · 2 comments · Fixed by #345

Comments

@vemv
Copy link
Member

vemv commented Oct 25, 2021

#308 started going more into the how to ns direction, however there's still a difference:

image

I'd say we should favor lists/vectors (as opposed to unwrapping elements) so that:

  • we don't contribute to a proliferation of styles
  • things are sortable via M-x sort-lines
    • else it won't meaningfully sort in mixed presence of colls vs. symbols.
  • indentation is consistent.

This particularly matters because e.g. rename-file-or-dir always performs a clean-ns, so renaming a ns should not change other aspects of its ns form (presumably formatted/linted with a variety of tools).

@camsaul
Copy link
Contributor

camsaul commented Dec 15, 2021

Is there some way to disable this change so we can keep the old functionality?

@vemv
Copy link
Member Author

vemv commented Dec 16, 2021

We can introduce a feature flag (which would have to be settable from clj-refactor.el also), PRs welcome as well

btw would appreciate camsaul/whitespace-linter#9 - might be a fair exchange 😇

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 a pull request may close this issue.

2 participants