This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-25
Channels
- # announcements (8)
- # aws (50)
- # aws-lambda (6)
- # babashka (25)
- # beginners (119)
- # bristol-clojurians (5)
- # calva (25)
- # chlorine-clover (23)
- # cider (6)
- # cljs-dev (125)
- # clojure (63)
- # clojure-austin (1)
- # clojure-belgium (1)
- # clojure-dev (48)
- # clojure-europe (11)
- # clojure-italy (2)
- # clojure-nl (5)
- # clojure-spec (3)
- # clojure-uk (66)
- # clojurescript (14)
- # core-logic (5)
- # datomic (13)
- # emacs (10)
- # events (2)
- # fulcro (37)
- # graalvm (11)
- # hoplon (95)
- # jobs-discuss (9)
- # juxt (11)
- # kaocha (16)
- # meander (13)
- # off-topic (24)
- # pedestal (4)
- # re-frame (36)
- # reagent (10)
- # reitit (15)
- # ring-swagger (5)
- # shadow-cljs (23)
- # spacemacs (2)
- # sql (13)
- # tools-deps (32)
- # xtdb (11)
@pez What do you think about having toggles in the settings pane as before, and create a cljfmt.edn
on the fly hidden from the end user?
I considered keeping the toggles, but thought it would blur things when you wanted to have custom indents. But maybe there is a clean way to do it.
Yeah, currently this build just throws in the lsp there and ocnce the repl is connected there will be a doubling of a lot of providers. You can report all the quirks on the PR: https://github.com/BetterThanTomorrow/calva/pull/572
Quick question about Calva + cljfmt.
When I pass this code through lein cljfmt check
it is valid, but if I format it in Calva it aligns all the values as columns. Is this something that’s caused by Calva? And most importantly, can I disable it? 😄
(def example
{:one-long-key :a-value
:one-short :b-value})
Result after formatting in Calva
(def example
{:one-long-key :a-value
:one-short :b-value})
My Calva config:
"calva.paredit.defaultKeyMap": "strict",
"calva.syncReplNamespaceToCurrentFile": true,
"calva.fmt.configPath": "./cljfmt.edn",
"calva.fmt.newIndentEngine": true,
"calva.fmt.formatAsYouType": true,
"calva.showDocstringInParameterHelp": true,
I emptied my cljfmt.edn
to test wether it’s related.Yes, we have a CI script that checks formatting using cljfmt and I want Calva to use the same rules :)
@UQP60F2B1 I reported that one. It's not related to your problem. Mine was about how cljfmt treats a destructuring as a map.
Your issue is, Calva/cljfmt is arranging your map in columns even when you have :align-associative
turned off.
@UJRDALZA5 Thanks! That seems to actually work ❤️
Cool! Then my best guess is cljfmt
moved from off-unless-stated to on-unless-stated on this option.
Calva's cljfmt hasn't moved at all. It is a quite old fork (which adds the algnments that @UQP60F2B1 so hates 😃 )
I kinda wish someone would just impose https://tonsky.me/blog/clojurefmt/ on everyone and be done with it. No configuration allowed! Like Golang.
[pez/cljfmt "0.0.4-SNAPSHOT"]
. Don't recall exactly where I forked off. But basically the only change from then master is that I merged in this PR: https://github.com/weavejester/cljfmt/pull/77
Looks like a bug. Maybe you can work around it by using an exlpicit config: https://calva.readthedocs.io/en/dev/formatting.html