This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-08
Channels
- # announcements (4)
- # aws (1)
- # babashka (4)
- # beginners (75)
- # biff (4)
- # calva (13)
- # clojure (76)
- # clojure-android (1)
- # clojure-austin (9)
- # clojure-europe (14)
- # clojure-mexico (3)
- # clojure-nl (2)
- # clojure-norway (11)
- # clojure-uk (14)
- # clojurescript (19)
- # conjure (14)
- # cursive (30)
- # datomic (13)
- # gratitude (6)
- # hyperfiddle (71)
- # introduce-yourself (2)
- # juxt (5)
- # malli (5)
- # nbb (5)
- # nrepl (10)
- # off-topic (32)
- # re-frame (3)
- # releases (1)
- # shadow-cljs (5)
- # sql (38)
- # tools-deps (24)
- # xtdb (19)
I think that's a clojure-lsp feature. You probably have to disable it in its config, if that's an option
Clojure-lsp returns a code action that you can invoke to do that, but I don’t know that it supports doing that itself, so I’m not sure what’s doing that. I didn’t see anything about it in the docs, at least. @UKFSJSM38 Does clojure-lsp automatically add missing requires if some setting is enabled? (The above does not happen for me if I try with clojure.string
.)
That's a clojure-lsp feature, if you select a completion item that is a alias or namespace and those exists/were already required previously in the project, clojure-lsp will add that require. ATM is not possible to opt-out, but I'd like to understand why one would like that, maybe there is something to be improved o server side
We are ofthe using function from separate namespace for debug. In order not to specify each time in list of requires we use if fully qualified namespace.
Looks like the function parameter hint,e.g, picture, is missing for multimethod. Or am I missing some configuration?
There is no configuration for this. It might be that cider-nrepl does not return the parameter info needed, or that it has a different format for multi-methods. You can investigate a bit by using the command Calva Diagnostics: Toggle nREPL Logging Enabled and check the messages sent and received. I have a feeling it might be something that makes it difficult to gather the args-list for multimethods.
Hovering on the defmethod symbol example gives nothing.
-> sent
{
op: 'info',
ns: 'foobar',
symbol: 'example',
id: '3637',
session: '664272c8-6cad-4c81-afab-e0fa8a1631ba'
}
<- received
{
column: 1,
file: 'file:/Users/pinkfog/dev/clj/src/foobar.clj',
id: '3636',
line: 217,
name: 'example',
ns: 'foobar',
session: '664272c8-6cad-4c81-afab-e0fa8a1631ba',
status: [ 'done' ]
}
code
(defmulti example (fn [x] x))
(defmethod example ::a
[x]
x)
It tells me that there is no args-list info there. Compare with the response for a regular function.