Fork me on GitHub

well, i don’t know what happened, but today i’m getting those errors again


and it’s not related to +cider


i even deleted ~/.m2/repository


and tried to launch repl again


I decided to use updated dependencies ( figured out them by using lein ancient ) and it worked. ( And also, i started using Java version 1.8 )


Someone here knows how to set and remove breakpoints from VSCode when debugging clojurescript?


Don't about VSCode but I have heard source maps got worse in the latest ClojureScript general difficult to create them for macros for instance


Does calva support breakpoint debugging for clj? I didn’t see anything in the readme


No, there's no debugging for clj in Calva. There is another extension that had that. I've been figuring on wether to contact that developer and check if there is a way he could make a version that only has the debugging stuff and that could then be used together with Calva. Today you have to choose, debugging or Calva.


There is practically no debugging for cljs either, the source maps are not accurate enough.


sheet, hehe


I see that it is possible to do some debugging on chrome


hey, @pez, from your experience, do you think it would be hard to make an extension to have better code navigation when dealing with the re-frame framework?


so for example i can set-up a hotkey to jump to an event handler definition


I like being able to jump to function definitions, i would enjoy being able to jump to subscriptions, events and effects definition too


So i may even create an extension


I mean, if you say it is something ok/simple to do i will certainly learn about how to create extensions to do it


Sounds good. It would be nice if we could find a way where that extension was compatible with Calva and even could be using Calva infrastructure.


yeah, i may put it on Calva


I don’t know how simple that extension would be to create though. I am not familiar with re-frame.


reframe calls some functions to define symbols as something ( like an event, effect or subscription )


like this, :navigate is an event i can dispatch from views


I am right now trying to make a node module out of some of Calva’s functionality. That would include the nREPL connection. I think it might mean that other extensions could use that connection. But I am not sure if I will be able to get it there.


I often would like to navigate to #citrus controllers like that, so I think it is a nice problem to solve.


Is it possible for you to point me in which part of the code is implemented the F12functionality? ( jump to function definition )


Yes, and hover.ts.


do you know how to point which part triggers it passing the args? like, when i press f12 over the symbol, which part of the code finds the definition?


i readed it again


and it looks like that that part actually gets the current word where i pressed the F12 on


Is calva lib open source too?

Space Guy20:12:54

Yes, it's in the same repository


i would like to see how the part that gets functions definitions is implemented, like, if it do a kind of regex match on (def) or (defn) or if it uses some clojure repl resource that tells where the function was defined, etc

Space Guy20:12:11

So, definition.ts a message over nrepl that looks like {:op "info" :ns "my.client" :symbol "main" :session ... }. CIDER is the one that adds a handler for "info" commands to respond to it - looking up a file and position - when given a symbol. If you added a handler for the same "info" command that finds re-frame definitions when given a keyword, it should work for your go-to-definition in Calva (and any other editor that uses similar commands)


A reason that I want to get a common library for the Calva extensions is so that I can replace code like that getWordAtPosition with the more structured ways of doing it that Calva Formatter uses.


It’s possible that Cider/Orchard has some functionality to plug in for re-frame. If so it gets to be an easier task.