This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-08
Channels
- # announcements (2)
- # babashka (100)
- # beginners (25)
- # biff (7)
- # calva (13)
- # cider (24)
- # clj-kondo (39)
- # cljsrn (2)
- # clojure (22)
- # clojure-dev (13)
- # clojure-europe (12)
- # clojure-gamedev (3)
- # clojure-losangeles (2)
- # clojure-nl (1)
- # clojure-norway (3)
- # clojure-spec (11)
- # clojure-uk (2)
- # clojurescript (20)
- # core-async (8)
- # cursive (7)
- # data-science (2)
- # datomic (14)
- # emacs (6)
- # events (7)
- # fulcro (9)
- # honeysql (1)
- # kaocha (24)
- # lambdaisland (3)
- # leiningen (6)
- # lsp (30)
- # membrane (7)
- # missionary (10)
- # nbb (48)
- # nextjournal (13)
- # off-topic (6)
- # parinfer (4)
- # pathom (1)
- # polylith (1)
- # reagent (7)
- # rewrite-clj (6)
- # ring (11)
- # sci (7)
- # shadow-cljs (8)
- # sql (13)
Apologies if this is already covered, but …
I’m seeing different linting rules applied in the VS editor than those applied when I run lein clojure-lsp format
. More in 🧵
I’ve got this in config.edn
:
:lint-as {clojure.test.check.properties/for-all clojure.core/let}
When run via lein
I’ll end up with e.g.
(prop/for-all [v a-generator]
(a-fn v))
but in the editor it formats like this:
(prop/for-all [v a-generator]
(a-fn v)))
even though the editor will format let
like this:
(let [v a-generator]
(a-fn v))
The project uses [com.github.clojure-lsp/lein-clojure-lsp "1.3.10"]
, which depends on [com.github.clojure-lsp/clojure-lsp-standalone "2022.06.29-19.32.13"]
, and Calva says “clojure-lsp version used: 2022.06.29-19.32.13”
it seems your pasted config.edn
is from .clj-kondo/config.edn
which is not used for formatting, for format clojure-lsp uses cljfmt, which can be configured on .lsp/config.edn
The doc here https://calva.io/linting/ says
Calva does no linting, yet with Calva you get excellent linting. That is because Calva uses clojure-lsp, which provides linting powered by clj-kondo.
Does that doc need to change?No, lint is not the same thing of formatting on most docs. Lint means: know your code, unknown vars, unused stuff, diagnostics. Format means: fix whitespaces etc
OK - I was definitely conflating them.
For anybody paying attention, I learned from @UKFSJSM38 that Calva has a setting to command it to use clojure-lsp’s config
lein update-in :dependencies conj '[nrepl,"0.9.0"]' -- update-in :dependencies conj '[cider/cider-nrepl,"0.28.5"]' -- update-in :plugins conj '[cider/cider-nrepl,"0.28.5"]' -- update-in '[:repl-options,:nrepl-middleware]' conj '["cider.nrepl/cider-middleware"]' -- with-profile +dev repl :headless
/bin/sh: lein: command not found
Jack-in process exited. Status: 127
Did someone got this when updating to Mac os Monterey?