This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (51)
- # beginners (65)
- # calva (45)
- # cider (6)
- # clara (3)
- # clj-kondo (30)
- # cljsrn (5)
- # clojure (67)
- # clojure-australia (7)
- # clojure-dev (7)
- # clojure-europe (43)
- # clojure-gamedev (1)
- # clojure-nl (6)
- # clojure-uk (7)
- # clojurescript (51)
- # conjure (1)
- # cursive (9)
- # datascript (16)
- # datomic (14)
- # depstar (20)
- # events (1)
- # exercism (17)
- # figwheel-main (6)
- # fulcro (9)
- # graphql (3)
- # gratitude (2)
- # honeysql (4)
- # jobs (7)
- # leiningen (3)
- # lsp (107)
- # meander (7)
- # minecraft (3)
- # off-topic (16)
- # other-languages (4)
- # pathom (4)
- # pedestal (26)
- # practicalli (4)
- # re-frame (3)
- # reitit (7)
- # remote-jobs (1)
- # shadow-cljs (26)
- # tools-deps (67)
- # vim (19)
- # vscode (1)
I’m he Calva space in Gather, if anyone would like to have a chat, get help with something, ask something, whatever. Details in the channel topic.
Did you folks ran into issues while jack-in? the issue itself it´s that nrepl is conflicting with my project. Looks like some of the dependencies i´m using uses nrepl
So @ramonp.rios visited the support room in Gather. 😃 I could only rubber duck, but at least we’re unblocked.
The particular problem was one I haven’t seen before. Something in the project (not directly) brought in
nrepl/nrepl "0.8.3" (the same as Calva Jack-in injects by default), it was brought in with an
exclusions . Don’t know if that had anything to do with it, but anyway, things didn’t work until Ramon edited that injection away from the command. Then he could connect. … Does anyone know if there is a command for checking which dependency brings in a particular dependency?
The dep in question here is nrepl/nrepl. And it is a Leiningen project, so maybe
clj won’t do it?
Hm. I would expect it to show nrepl somewhere nested under another dependency, which would be the one pulling it in, but I’m not sure what you saw as output.
On another topic. Earlier today @alexander.minolta asked if there is a command that can open a file by pasting the Clojure namespace of it. Which there isn’t, and since Calva supports navigating to files from namespaces I don’t think it is much worth adding it to Calva. However, it sounded to me like there is general enough use for replacing things when pasting in a configurable way. So I created an extension of its own for it. 😃 https://marketplace.visualstudio.com/items?itemName=betterthantomorrow.paste-replaced Demo of what I think solves Alexander’s use case attached.
I’m especially proud of the icon, which I just made up. 😃 See how the the clipboard is reshaped as it is pasted?
The main reason I asked about it is to simplify getting from logs, test results and stracktraces to the source code.
This is cool, it actually does exactly what’s needed. Is it possible to limit it only to the command pallete input?
You should be able to specify that in the
when clause of the keyboard shortcut binding. But you can also just not use it in places you don’t want to use it?
I was actually thinking about using a standard shortcut for it (cmd-V) in that field.
One thing I noticed is that in your example config, dash to underscore replacement should also use global flag
OTOH, while this extension improves the problem by a lot, there is still a problem remaining: when opening a file via command pallete, it is looking for matches using some fuzzy search and rating recently opened files higher than exact matches, so it won’t always bring the exact match on top. This is especially true in cases when you have a test file that matches the namespace almost exactly but has extra “_test” in the name.
Thank you again for doing it @pez! I really appreciate you looking and implementing it!
I had to change the shortcut back as it was messing around with branch names.
Hello! When doing jack-in to a deps-based project, is it possible to specify somehow also aliases defined in my
~/.clojure/deps.edn ? They are (fortunately) not listed there. Additionally, can I set options like I can do on the clj command line, e.g.
calva.myCljAliases is the answer?
You guessed it about the aliases. There's no way to add arbitrary command line options though. That we could add.
@pez I’m back again, trying to add the Test Result view into Calva 😄
I’ve opened a PR to add some type annotations to
testRunner.ts on top of which my subsequent changes should be easier to make safely.
Welcome back! Have you had a look at Test Explorer and if we should integrate with that? It is great with JS.
Reporting the tests into Test Explorer is pretty straight forward. I’ve built a little prototype where I can run tests through Calva and get the results to display in Test Explorer. The harder part is the part that should be easy 😆 enumerating the tests up-front.
Can we do without that at first, maybe? Instruct the user to run all project tests to populate it.
Merged the PR. Huge improvement! Thanks! (I wrote that horrible code before converting Calva to TypeScript, but I wouldn’t have written it much better either way because Calva is my first TS experience. 😃 )
> I wouldn’t have written it much better either way because Calva is my first TS experience. 😃 ) > > At CircleCl I spend all day wrangling with a 10 year old monolith that was the first Clojure project for about 100 people.