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

Format aligned legacy merge #2292

Merged
merged 5 commits into from
Aug 20, 2023
Merged

Format aligned legacy merge #2292

merged 5 commits into from
Aug 20, 2023

Conversation

PEZ
Copy link
Collaborator

@PEZ PEZ commented Aug 19, 2023

What has changed?

When fixing the issue with new cljfmt using a new configuration format, I forgot about how we are using an old cljfmt for the Format and Align Current Form command/mode. That cljfmt of course uses the old configuration format. It all gets quite confusing already before this fact, with the backward compatibility ket :legacy/merge-indents? key... I tried to ease the extra confusion a bit by:

  1. first adapting to the new configuration format, honoring the :legacy/merge-indents? key, and
  2. then converting to the old configuration format, merging default-indents.

The case we don't handle (which i am not sure we ever handled) is align-formatting using the legacy format and the ^:replace metadata. That can only be achieved by using the new configuration format (and not specifying legacy merge). Haha, I don't know if this is possible to follow, but anyway, the (hopefully small) slice of the user base, that want aligned formatting, and that can't use the new configuration format, won't be able to.

I don't think I can express how much I long for this PR to be merged into cljfmt:

😄

Also in this PR is an update of Calva's own cljfmt.edn config to use the new configuration format, as well as some fixes to the formatting that had become weird because we had forgotten about this. Oh, the irony...

My Calva PR Checklist

I have:

  • Read How to Contribute.
  • Directed this pull request at the dev branch. (Or have specific reasons to target some other branch.)
  • Made sure I have changed the PR base branch, so that it is not published. (Sorry for the nagging.)
  • Made sure there is an issue registered with a clear problem statement that this PR addresses, (created the issue if it was not present).
    • Updated the [Unreleased] entry in CHANGELOG.md, linking the issue(s) that the PR is addressing.
    • Referenced the issue I am fixing/addressing in a commit message for the pull request.
  • Figured if anything about the fix warrants tests on Mac/Linux/Windows/Remote/Whatever, and either tested it there if so, or mentioned it in the PR.
  • [ ] Added to or updated docs in this branch, if appropriate
  • Tests
    • Tested the particular change
    • Figured if the change might have some side effects and tested those as well.
  • Formatted all JavaScript and TypeScript code that was changed. (use the prettier extension or run npm run prettier-format)
  • Confirmed that there are no linter warnings or errors (use the eslint extension, run npm run eslint before creating your PR, or run npm run eslint-watch to eslint as you go).

Ping @PEZ, @bpringe, @corasaurus-hex, @Cyrik

@PEZ PEZ requested a review from bpringe August 19, 2023 16:11
@netlify
Copy link

netlify bot commented Aug 19, 2023

Deploy Preview for calva-docs ready!

Name Link
🔨 Latest commit 9bde775
🔍 Latest deploy log https://app.netlify.com/sites/calva-docs/deploys/64e0e996a0653d00087fc655
😎 Deploy Preview https://deploy-preview-2292--calva-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@PEZ PEZ merged commit 6a1fdfc into dev Aug 20, 2023
5 checks passed
@PEZ PEZ deleted the 2289-format-aligned-legacy-merge branch August 20, 2023 13:00
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.

1 participant