Fork me on GitHub

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.


Hah I never use tab in emacs, itโ€™s a different muscle memory.


Iโ€™ll try using tab more. This and the delete forward sexp is my main tripping points. I can customize the latter though.


You can customize tab as well.


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.


Iโ€™ll try to have a look at trying PRs locally


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?


Test both backwards and forwards slurp. It is the backwards one that twists my brain mostly.


This is now released. File an issue if it misbehaves. ๐Ÿ˜ƒ


Woot! Sorry for not testing earlier !

Cas Shun14:05:33

Curious if there's been any progress on this issue: , I'm constantly having issues figuring out errors when using inline evals

Cas Shun14:05:36

it's particularly annoying because inline eval *e just gives me a clj-kondo error, not the error of the last eval


clj-kondo error?


I'd welcome a PR for that issue, anyway. ๐Ÿ˜ƒ

Cas Shun17:05:17

@pez every error is something like #error { :cause "clj-kondo.core" :via [{:type java.lang.ClassNotFoundException :message "clj-kondo.core" :at [.URLClassLoader findClass "" 382]}] :trace

Cas Shun17:05:34

unless I type in the repl window itself

Cas Shun17:05:40

(who does that though?)

Cas Shun17:05:42

To be clear, that's if I inline eval *e


@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 does warn about this though ๐Ÿ˜‰


Ah, yes, I was about to say it couldn't come from Calva. ๐Ÿ˜ƒ


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 simple_smile


@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)


Thanks, I'll look into that


Found the issue =D, will fix soon


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?


If you're in multi-line edit mode, which I think is the default, it should be alt+up


Single-line however is just up


yep, it means single line is not working as expected. will restart


@dennisa Hmm.. if it persists, please create an issue.


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


{ "key": "up", "command": "calva.replWindow.historyUp", "when": "calva:replWindowActive && config.calva.REPLWindowPromptKeyMap == 'single-line'" }


The shortcut is the default one, arrow up


Weird, an issue with repro steps would be very welcome simple_smile


v2.0.100 is out with a couple fix / maintenance items