Fork me on GitHub
Денис Нибаев08:08:08

Hi. How can I disable autorequire on completion when using full namespace?

Lukas Domagala10:08:05

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

👍 1
Денис Нибаев07:08:34

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' ]
(defmulti example (fn [x] x))

(defmethod example ::a


It tells me that there is no args-list info there. Compare with the response for a regular function.


yup. I am more clear about the scope and responsibility between calva and cider-nrepl.


Please thread extra info like this together with the question.