This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-13
Channels
- # admin-announcements (1)
- # announcements (40)
- # aws (2)
- # babashka (46)
- # babashka-sci-dev (106)
- # beginners (31)
- # cider (5)
- # circleci (2)
- # clj-kondo (48)
- # clojure (118)
- # clojure-belgium (1)
- # clojure-chicago (3)
- # clojure-europe (19)
- # clojure-ireland (3)
- # clojure-losangeles (2)
- # clojure-nl (2)
- # clojure-spec (10)
- # clojure-uk (4)
- # clojurescript (18)
- # community-development (5)
- # core-async (159)
- # cursive (16)
- # datomic (16)
- # etaoin (1)
- # fulcro (21)
- # funcool (14)
- # graalvm (5)
- # gratitude (4)
- # holy-lambda (28)
- # jobs (1)
- # jobs-discuss (1)
- # kaocha (1)
- # lsp (12)
- # malli (21)
- # meander (12)
- # music (1)
- # off-topic (8)
- # portal (5)
- # react (18)
- # reitit (1)
- # releases (4)
- # remote-jobs (1)
- # shadow-cljs (56)
- # timbre (4)
I’ve just tried “Show call hierarchy” in calva and it returns every dependency twice. Do you think thats a problem with lsp or calva?
I've seen duplicate info for lsp functionality when in .cljc
files (analysis returns info for both cljs
and clj
). What type of clojure file are you in?
ah you are totally correct, it’s happening with any cljc file. So in that case calva probably should tell lsp if it wants the clj or cljs references
btw repo is basically any defn in a cljc file, so:
(defn i []
(inc 1))
has a reference to clojure.core/inc and cljs.core/incit's a clojure-lsp issue, not sure what would be the best approach to solve though, if we should consider only one of those like the clojure one not the cljs one
I think returning both is a good default since LSP has no way of knowing the compiler env. In the Calva integration the env could be passed in so only the “right” deps get returned
yeah, there is no way calva can change that behavior I think, the best would be to make clojure-lsp return the correct one if there is any way to know which one return
Also, remeber that clojure-lsp is used in a lot of other editors, if we make some calva specific code, we need to do that on other editors as well
yeah, I haven’t looked at the lsp-calva link yet, but I was thinking lsp could provide an optional setEnv
api or similar to all editors. So anytime I switch from cljs <-> clj it would tell LSP. If it’s not set it just assumes both like it does now.
I think this might also be helpful other analysis in LSP. If it’s just the hierarchy thing it might be overkill.