This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-21
Channels
- # announcements (7)
- # babashka (16)
- # beginners (174)
- # biff (7)
- # calva (20)
- # cider (3)
- # clerk (6)
- # cljsrn (4)
- # clojure (98)
- # clojure-europe (57)
- # clojure-italy (3)
- # clojure-nl (1)
- # clojure-portugal (1)
- # clojure-spec (15)
- # clojure-uk (7)
- # code-reviews (3)
- # cursive (23)
- # data-science (1)
- # datomic (26)
- # dev-tooling (2)
- # emacs (5)
- # figwheel-main (4)
- # fulcro (3)
- # honeysql (20)
- # hyperfiddle (20)
- # malli (8)
- # membrane (31)
- # nextjournal (5)
- # pathom (1)
- # polylith (20)
- # re-frame (14)
- # reitit (8)
- # releases (2)
- # shadow-cljs (50)
- # specter (2)
- # sql (22)
- # xtdb (5)
❓ Is there a way to get the inlay “usages” work with clojure and cursive? I find it very useful when I refactor.
i don't think it's supported yet, but i found it super annoying in javascript code, because it makes the code jumping around, since the inlays are inserted after a bit delay, after certain operations and that shifts the lines vertically.
otherwise, var names are also highlighted with a dimmed color, if there are no usages
of them.
though i found that a bit unreliable. the no usages
case is not always indicated by dimming the var name.
oh that’s strange i did not notice any delay on my end on the js project i am using it with.
i forgot about the color thing thanks for the reminder
ah, you are right, the Code author
inlay is the one, which is delayed!
the problem with the usages is that it wastes a lot of vertical space.
compare these two screenshots. with and without usages inlay. it's this code: https://app.predict.gini.co/js/gini.mjs
i agree but that’s also an extreme case where every line in the file is an export
it's a bit of an edge case, i have to admit, since there are a lot of one-liner functions in this specific file, but the exaggeration helps to highlight the issue of wasted vertical screen estate
why do want to see it? are you using it to navigate to the call-sites via mouse clicks?
maybe it's not such a bad idea then, if someone is in the mode of discovering a code base
btw, did u know, that the Cmd-B
is option is also bound to the Force touch
event (besides Cmd-Click
)?
it is for refactoring purposes. I like to see functions that are not called often (1 or twice) because i can then consider to inline those / or not. with Cmd-B I would have to do it on every function. When i see “usages” visually as an inlay hint it is easier for me to scan the code. Actually i just do it as I work on something else.
👋 im having a dependency resolution issue that appears similar to https://github.com/cursive-ide/cursive/issues/572, but were still seeing it. curious if anyone has ideas on how to fix. specifically, we are building with leiningen, and in my project.clj, have :local-repo
pointing to a relative path for a nested profile:
{:profiles {:dev [:some-other-profile :test]
:some-other-profile {:local-repo "my-local-m2"}
}
building this, intellij throws a bunch of dependency resolution errors. if i switch to the absolute /Users/path-to-repo/my-local-m2
, intellij is happy, but then i have issues in docker. is there some way for me to refer to this relative path in the repo so docker and intellij can both build this project?just reupping this post in case anyone has ideas. still stuck 😞
What is the issue in docker? How about in docker just symlink the absolute path to where you want it to point, e.g. some relative path?
(This is just a guess...)
Or: could :local-repo be defined as e.g. :env/LOCAL_M2 and then specified separately in your local environment and docker? (Guessing again..)
Seems you can do dynamic eval as well: https://codeberg.org/leiningen/leiningen/src/branch/stable/doc/PROFILES.md#dynamic-eval
Wow, great effort and work! 🌟
just reupping this post in case anyone has ideas. still stuck 😞