This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-02
Channels
- # ai (5)
- # announcements (1)
- # babashka (8)
- # beginners (16)
- # clojure (21)
- # clojure-europe (3)
- # clojure-norway (6)
- # clojure-uk (1)
- # datomic (3)
- # events (4)
- # figwheel-main (5)
- # fulcro (10)
- # jobs (1)
- # lsp (26)
- # missionary (5)
- # pedestal (1)
- # polylith (3)
- # portal (28)
- # practicalli (1)
- # reagent (37)
- # reitit (1)
- # scittle (24)
- # tools-deps (7)
Hi, not sure how it is complicated to implement (or maybe can be configured?). Some libraries are aliasing symbols from its other namespaces as plain defs, e,g,
(ns lib.core-ns
(:require [lib.other-ns :as other]))
(def a-function other/a-function)
A hover doc in my code for lib.core-ns/a-function
won't show anything, because there is no docstring for aliased def. I've a keybinding for printing (doc sym)
in a repl as a workaround atm.One way to workaround this is to add this meta do the first function:
^{:doc (:doc (meta #'other/a-function))}
I know it's not ideal. not sure if would be possible without affect performance as we would have to parse the nodes during hover doc build but It may worth the try
(def ^{:doc (:doc (:meta #'clojure.core/map))}
map clojure.core/map)
ma|p
so hover here isn't working for me@U34K4458X it should be meta
not :meta
yeah, like I said it's a hack that works for that specific case, won't work for more advanced things that require runtime analysis
One of the few instances where nrepl middleware providing docstrings is better than lsp