This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-11
Channels
- # announcements (4)
- # babashka (4)
- # beginners (164)
- # calva (47)
- # cider (1)
- # cljs-dev (29)
- # cljsrn (3)
- # clojure (137)
- # clojure-europe (23)
- # clojure-nl (3)
- # clojure-spec (7)
- # clojure-uk (44)
- # clojurescript (35)
- # component (8)
- # conjure (119)
- # cursive (32)
- # datomic (12)
- # emacs (31)
- # figwheel-main (36)
- # graalvm (10)
- # jobs (2)
- # kaocha (1)
- # lein-figwheel (3)
- # meander (15)
- # mount (3)
- # off-topic (9)
- # pathom (8)
- # quil (4)
- # re-frame (13)
- # reagent (15)
- # remote-jobs (10)
- # shadow-cljs (128)
- # slack-help (2)
- # spacemacs (8)
- # test-check (6)
- # xtdb (6)
One thing that I love about Emacs / Clojure Mode / Paredit is that I can press a closing bracket e.g. )
or ]
and it will automatically bring all the trailing parentheses/brackets to the current line. I can do the same in Calva with ctrl-J but it leaves a space I have to manually delete.
Not sure I am following, but pressing tab
folds the paren trail. I've deliberately made it something that doesn't happen as-you-type b/c I like for the user to be in control of this.
I’ll try using tab more. This and the delete forward sexp is my main tripping points. I can customize the latter though.
One other thing with Calva’s paredit is that sometimes when I’m slurping expressions it will not cross some boundaries. Emacs will happily keep slurping through {} [] ()
I had this in a dev branch somewhere, but then I couldn't easily make it reformat past the currently enclosed form so scrapped it b/c w/o feedback it got a bit dangerous. But last week I made a few changes to the as-you-type formatting, that might allow this. Please file an issue. 😍
Here's the issue and the PR. Does it seem like the thing you are asking for here? If so, maybe it is reasonably simple to wake up. https://github.com/BetterThanTomorrow/calva/issues/554 https://github.com/BetterThanTomorrow/calva/pull/555
Here's a VSIX where I think I might have gotten it to work. It is a bit unintutive to me yet, so can't fully judge it. 😃 Can you give it a spin? https://6124-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.101-slurp-enclosing-554-124fb68f.vsix
Test both backwards and forwards slurp. It is the backwards one that twists my brain mostly.
Curious if there's been any progress on this issue: https://github.com/BetterThanTomorrow/calva/issues/434 , I'm constantly having issues figuring out errors when using inline evals
it's particularly annoying because inline eval *e just gives me a clj-kondo error, not the error of the last eval
@pez every error is something like
#error {
:cause "clj-kondo.core"
:via
[{:type java.lang.ClassNotFoundException
:message "clj-kondo.core"
:at [
:trace
@auroraminor Maybe it helps if you post the entire stacktrace? (in a gist or upload as file)
I think this might happen because some piece tries to invoke clj-kondo.core/run!
or something else while the namespace has not yet been required
user=> clj-kondo.core/x
Syntax error (ClassNotFoundException) compiling at (REPL:0:0).
clj-kondo.core
could be coming from here maybe? https://github.com/BetterThanTomorrow/calva/blob/69c26b0c661f953d47d8e9705568d89837ce3baf/src/debugger/decorations.ts#L22
although there is this: https://github.com/BetterThanTomorrow/calva/blob/69c26b0c661f953d47d8e9705568d89837ce3baf/src/debugger/decorations.ts#L101
@auroraminor You can try to invoke (require 'clj-kondo.core)
yourself in the REPL
My thought was the recent decorations addition as well. I wonder if we should put the require call in the getLintAnalysis
function so that it's called before every call - after it's required the first time it shouldn't cause any overhead I think, but still, it should be required any time execution reaches that point since the require is in the activate
function for the decorations
@auroraminor If you can provide a reproducible project/situation that would be much appreciated.
Nvm I've found a repro-case by not loading clj-kondo as a dep in the connected repl, which should not cause this problem. I will investigate
@brandon.ringe you can use requiring-resolve
maybe
(but that depends on 1.10, might not be good for Calva, but you could re-implement it)
Perhaps I missed it as a feature), but I cannot press the Up arrow in the Calva repl prompt to cycle through the previous commands. Is it my buggy setup?
I just checked on Windows as well. It's the same issue: i evaluate an expression say (inc 0). Press arrow up, nothing happens. Press Alt-arrow up, then i can go back to (inc 0) and cycle the old ones. Are you sure it's not intended behaviour : ) ?
This is the intended behavior for multi-line repl window mode. I'm somewhat confused now about what you're saying, lol. If it's working with alt+UpArrow in single-line mode then maybe some key bindings were changed. I'd check your keyboard shortcuts