This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # adventofcode (69)
- # babashka (21)
- # beginners (246)
- # calva (49)
- # chlorine-clover (19)
- # circleci (3)
- # clj-kondo (38)
- # cljsrn (1)
- # clojure (52)
- # clojure-australia (2)
- # clojure-europe (41)
- # clojure-nl (5)
- # clojure-spec (4)
- # clojure-taiwan (2)
- # clojure-uk (28)
- # clojurescript (12)
- # cryogen (6)
- # cursive (6)
- # datahike (3)
- # deps-new (5)
- # fulcro (2)
- # garden (1)
- # graalvm (3)
- # hoplon (48)
- # jackdaw (6)
- # jobs (3)
- # kaocha (6)
- # malli (3)
- # off-topic (51)
- # rdf (1)
- # reagent (40)
- # reitit (32)
- # remote-jobs (1)
- # reveal (24)
- # shadow-cljs (21)
- # startup-in-a-month (5)
- # xtdb (8)
Could it be that the clj-kondo integration in clojure-lsp has broken the ability to configure clj-kondo? I have some rules in
.clj-kondo/config.edn , which don’t seem to be picked up anymore. When I put them in
.calva/.clj-kondo/config.edn they also don’t work…
I think tools using clj-kondo internally should respect
.clj-kondo/config.edn since the editor isn't the only tool leveraging this config. Think CI jobs, other people in your team using other editors like emacs with only flycheck, etc.
Indeed. That’s the intended behaviour. Let’s see what @brandon.ringe can tell us about any difficulties with this.
I would like it if
paredit.selectCloseList would also select a top level form if cursor is at it's start (same for all *List ops).
My misfit workflow where "Alt+D"=killToClipboard carries everything is mildly stunted by the lack thereof.
Another example: Ctrl+D (kill list) should be able to delete a top level form if in front of it.
Generally I try to keep the paredit commands close to the primitives used internally in Calva, to make it easier for me to “think” with them. As primitives they need to be quite clean and not have branches if it can be avoided. So if we can solve this
selectCloseList in a way that we don’t need to change the paredit command; that is preferable.
!calva:inSexp flag would allow branching between
selectForwardSexp, the latter works top-level.
Me, I'm shooting for "use one thing all the time" rather than "mental gymnastics based on context", at least for now; I'm paredit newbie.
It’s made to be composable, so I’m opting for that. But if we can aid the actual composing with when clauses, I am all for it. 😃
me and @snoe are focused on merging the integration with clj-kondo, which probably will solve that too, but a issue on clojure-lsp tro track the bug may help
@borkdude Some people actually get two prompts when Calva starts currently. Maybe that is overwhelming for some. Though I suspect that here it is really Parinfer that is the deal breaker. Calva actually works pretty well with the Parinfer extension, but there is no smartmode for sure.
To be honest, I got a little bit annoyed by Calva indentation when I was in VSCode the other day, in how it indents when you press tab, eating up newlines e.g.:
(comment (svc/clear-cache!) (svc/reset) <tab> )
is there a way to turn that off?
(comment (svc/clear-cache!) (svc/reset))
(probably because I'm not used it normally in emacs, annoyance by having to change my habits)
Btw, I just fired up VSCode, to test this. It prompted me to uninstall the clj-kondo extension. But now I get no linting whatsoever in my /tmp/foo.clj script...
I'll leave that to you as an optional thing to do, it wasn't my intention to discover more issues after the one I mentioned. I use VSCode only occasionally. So do with this whatever you want :).
I think you have more context here than I have. I feel the presence of something that has broken, but would appreciate to have your phrasing of the issue.
I'll make an issue and look into it, thanks! I think this is maybe because what files the clj-kondo extension feeds into kondo and what files clojure-lsp feeds in are different by default. Just a guess though so far.
This is my code in /tmp/foo.clj
(ns foo (:require [clojure.set :as set])) (set/onion) ;; onion should be union (defn x ) (comment x y (+ 1) (+ (1 2 3)) (/ "foo") )
It can’t currently be configured away. Calva has two modes: format-on-demand and format-on-type. The former is aggressive, the latter leaves empty lines and the paren trail alone. However, your example should result in
If it doesn’t, then that is a bug.
(comment (svc/clear-cache!) (svc/reset) )
I think he's hitting tab though, in which case I thought that was intended. I may be wrong though.
It’s intentional. So, I forgot to mention the third mode: If you press tab when the paren trail is folded and tucked to the cursor, it get’s really aggressive. 😃 But you can certainly configure the formatter to leave empty lines alone. It’s
cljfmt after all: https://calva.io/formatting/#configuration
> The cljfmt docs mention the :cljfmt config key of Leiningen projects. Calva does not yet read the config from there, so if your Leiningen project has such a configuration, you will need to copy it out into a file.