Fork me on GitHub
#lsp
<
2023-12-16
>
Noah Bogart01:12:09

has anyone put in work to add docstring support to defprotocol or similar functions that aren't defined in clojure/core.clj? i'd be willing to help if not

ericdallo17:12:00

I took a look and I can't understand how it's a lsp issue, we don't have any custom behavior for defprotocol itself

Noah Bogart17:12:23

lol excellent. I’ll try a smaller repro with clj-kondo alone to see what’s up

ericdallo17:12:26

it seems there is no var-definition in analysis in lsp:

(filter
  #(= 'defprotocol (:name %))
  (:var-definitions (get (:analysis @clojure-lsp.db/db*) "jar:file:///home/greg/.m2/repository/org/clojure/clojure/1.11.1/clojure-1.11.1.jar!/clojure/core.clj")))

=> ()
so it may be something with the way we call kondo that makes it don't return those analysis

👍 1