This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-06
Channels
- # aleph (1)
- # announcements (3)
- # asami (32)
- # aws (12)
- # babashka (6)
- # beginners (43)
- # calva (36)
- # cider (3)
- # clj-kondo (3)
- # cljs-dev (2)
- # clojars (6)
- # clojure (66)
- # clojure-europe (14)
- # clojure-uk (2)
- # clojurescript (12)
- # conjure (1)
- # core-async (27)
- # cursive (17)
- # data-science (9)
- # datahike (1)
- # datomic (28)
- # emacs (34)
- # events (1)
- # girouette (3)
- # jobs (1)
- # klipse (4)
- # lsp (26)
- # malli (5)
- # off-topic (38)
- # portal (1)
- # releases (1)
- # shadow-cljs (72)
- # sql (7)
- # tools-deps (5)
- # vim (9)
- # xtdb (18)
I'm trying to auto-activate the signature help in clojure-lsp via trigger chars. I would like the signature to activate when I complete at point and then type " ". How can I add additional chars to triggers to achieve this?
Or maybe clojure-lsp
could detect the fn in a position and send the trigger request from the server?
hum, not sure the spec supports that, In my experience, lisp doesn't work that well with that feature
will clojure-lsp use clj-kondo hooks in the project? (since it uses clj-kondo for analysis under the hood)
@jacob.maine I noticed you're working on goto definition in the recent commits. One thing that might also be improved is when navigating to a var that was declared
and later defined, I think goto def should go to the def
rather than the declare
That’s surprising @U04V15CAJ… as @UKFSJSM38 said, it’s supposed to go to the def
, not the declare
Can you share a snippet that fails?
ok, thanks
fwiw, clojure-lsp is supposed to go to the last analysis element it finds. but it relies on clj-kondo to define last. that is, it uses the last matching element returned by clj-kondo. it doesn’t sort elements by line number. does clj-kondo have any guarantees about element order?
(and @UKFSJSM38 why does it exclude delcarations? what if a var is declared but never defed?)
I think clj-kondo inserts the found vars in the order it finds them, so they should be sorted by line number already
I worry about the performance implications of sorting elements… we could do it during normalization to minimize the cost, but still, sorting isn’t cheap. If clj-kondo returns the analysis elements already sorted, it’d be cheaper to rely on that
The issue may have happened in a .cljc file where the order relies on first the clj aspects of the file and then the .cljs aspects which might mess up things a little bit
@U04V15CAJ, that makes sense. I’ll think about the implications of that on the clojure-lsp side. For now, ’night!