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

Map key/value pair aligning is not working on format #1535

Closed
furkan3ayraktar opened this issue Feb 15, 2022 · 4 comments · Fixed by #1548 or #1559
Closed

Map key/value pair aligning is not working on format #1535

furkan3ayraktar opened this issue Feb 15, 2022 · 4 comments · Fixed by #1548 or #1559
Labels
bug Something isn't working formatting

Comments

@furkan3ayraktar
Copy link

Calva was able to align map key/value pairs when formatting the current file until the version 2.0.241. After that version, it stopped working. I can still align them by pressing ctrl+alt+l within each map, however, it is not working when the file is formatted by Calva.

.cljfmt.edn👇

{:remove-surrounding-whitespace?  true
 :remove-trailing-whitespace?     true
 :remove-consecutive-blank-lines? false
 :insert-missing-whitespace?      true
 :align-associative?              true}

and the VSCode settings 👇

{
  "editor.formatOnSave": true,
  "files.insertFinalNewline": true,
  "files.autoSave": "off",
  "files.eol": "\n",

  "calva.showDocstringInParameterHelp": true,
  "calva.paredit.defaultKeyMap": "strict",
  "calva.paredit.strictPreventUnmatchedClosingBracket": true,
  "calva.referencesCodeLens.enabled": false,
  "calva.fmt.configPath": ".cljfmt.edn",
  "calva.keybindingsEnabled": true,
  "calva.prettyPrintingOptions": {
    "enabled": false,
    "width": 120,
    "maxLength": 50,
    "printEngine": "pprint"
  },
}
@PEZ PEZ added the bug Something isn't working label Feb 19, 2022
@PEZ PEZ mentioned this issue Feb 19, 2022
16 tasks
@PEZ PEZ linked a pull request Feb 19, 2022 that will close this issue
16 tasks
@PEZ
Copy link
Collaborator

PEZ commented Feb 19, 2022

Please help testing this VSIX, containing a fix for this bug: https://18064-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.244-formatter-config-from-lsp-90442af0.vsix

@PEZ PEZ closed this as completed Feb 21, 2022
@furkan3ayraktar
Copy link
Author

Hi @PEZ, I've tested it with 2.0.244 and now it fixes the map alignment with tab but still it does not fix the alignments automatically when I save the file.

@PEZ
Copy link
Collaborator

PEZ commented Feb 22, 2022

Ah, thanks. I'll look at it.

PEZ added a commit that referenced this issue Feb 23, 2022
@PEZ PEZ linked a pull request Feb 23, 2022 that will close this issue
15 tasks
@PEZ
Copy link
Collaborator

PEZ commented Feb 23, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working formatting
Projects
None yet
3 participants