Fork me on GitHub
#calva
<
2018-12-05
>
mateus.pimentel.w13:12:52

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

mateus.pimentel.w13:12:04

and it’s not related to +cider

mateus.pimentel.w13:12:30

i even deleted ~/.m2/repository

mateus.pimentel.w13:12:41

and tried to launch repl again

mateus.pimentel.w16:12:06

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 )

mateus.pimentel.w17:12:10

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

richiardiandrea17:12:28

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

dadair17:12:26

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

pez17:12:14

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.

pez17:12:01

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

mateus.pimentel.w19:12:57

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

mateus.pimentel.w19:12:51

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?

mateus.pimentel.w19:12:11

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

mateus.pimentel.w19:12:04

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

mateus.pimentel.w19:12:38

So i may even create an extension

mateus.pimentel.w19:12:53

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

pez19:12:01

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.

mateus.pimentel.w19:12:44

yeah, i may put it on Calva

pez19:12:52

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

mateus.pimentel.w19:12:17

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

mateus.pimentel.w19:12:47

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

pez19:12:05

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.

pez19:12:01

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

mateus.pimentel.w19:12:24

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

pez19:12:30

Yes, and hover.ts.

mateus.pimentel.w19:12:09

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?

mateus.pimentel.w20:12:49

i readed it again

mateus.pimentel.w20:12:08

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

mateus.pimentel.w20:12:38

Is calva lib open source too?

spacemods20:12:54

Yes, it's in the same repository

mateus.pimentel.w20:12:39

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

spacemods20: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)

pez20:12:11

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.

pez20:12:17

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