This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-29
Channels
- # announcements (3)
- # babashka (47)
- # beginners (88)
- # calva (17)
- # clj-kondo (8)
- # cljdoc (1)
- # clojars (9)
- # clojure (98)
- # clojure-europe (53)
- # clojure-norway (2)
- # clojure-seattle (1)
- # clojure-uk (5)
- # clojurescript (20)
- # cursive (11)
- # data-oriented-programming (1)
- # data-science (3)
- # datahike (1)
- # datascript (3)
- # events (3)
- # graalvm (5)
- # honeysql (7)
- # hyperfiddle (1)
- # jobs-discuss (10)
- # leiningen (3)
- # malli (16)
- # music (4)
- # nbb (17)
- # off-topic (45)
- # pathom (9)
- # portal (7)
- # releases (1)
- # shadow-cljs (80)
- # sql (15)
- # tools-build (5)
- # xtdb (23)
When I connect to a running REPL(using port-forwarding) in my pods/VMs, Jump to definition
stops working. If I am running a local REPL, it works fine, and without a REPL also it works fine. Anyone knows how to fix that?
it doesn’t seem to be calva specific, for emacs also I see it happening, @U0ETXRFEW you happen to know why this happens or any way we can fix it?
My understanding was that this is because cider uses absolute paths to identify files, and the paths of the files in vscode and in the container are different. It works before you connect to a REPL because the language server (LSP) operates on relative paths. I vaguely remember that folks were talking about adding a setting to allow end-users to specify whether they wanted to use cider or LSP for go-to-definition, but I’m not sure if it landed or what it was called?
thanks, any workaround around this? I had to clone a repo and open it side by side last time I was trying to debug something inside REPL just to use go-to-definition.
@U0ETXRFEW bumping this again, in case you have any ideas
The setting that @U01EB0V3H39 recalls actually exists. calva.definitionProviderPriority
. It doesn't really fix the issue, but could be a workaround.
so in my case, it’s repl, lsp
. I’ll try changing it to lsp, repl
and see if I can go to definition
There is also a less brute version of your cloning-the-repo workaround. You can create two VS Code workspaces and add the same project folder to both of them. Then open the workspaces in different windows.
lsp lookups aren't very good with .cljc
files. Since lsp is static, it can't know wether it's the Clojure or ClojureScript definition that should be used.
Hi noob here — is alt
+ enter
the only way to trigger a repl? I’m following this https://www.youtube.com/watch?v=6uUynWkMDGM and when I use alt(option)
+ enter
, nothing’s happening on my end
alt
+ enter
evaluates the (+ 1 1) it does not start the repl. Or at least this is my understanding :)
@U02AMR8032L yup you were right haha -- I was not connected 😅. Also, I realized only after that the REPL needs to be run to refresh the function before you can call it and see the updated changes (it doesn’t do it automatically). Was changing “Hello World” to “poop,” and yet the REPL was still displaying “Hello World” to my dismay. 😤 Thanks @U013MQC5YKD for pointing me in the right direction/showing me how to go about REPL-driven development! So relieving to finally get it haha 🙂