This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-22
Channels
- # announcements (9)
- # asami (52)
- # aws (1)
- # babashka (7)
- # babashka-sci-dev (12)
- # beginners (72)
- # calva (24)
- # cider (9)
- # clj-kondo (76)
- # cljs-dev (15)
- # clojure (19)
- # clojure-australia (4)
- # clojure-europe (33)
- # clojure-france (9)
- # clojure-gamedev (17)
- # clojure-nl (6)
- # clojure-portugal (5)
- # clojure-uk (5)
- # clojurescript (61)
- # clojureverse-ops (4)
- # code-reviews (23)
- # conjure (1)
- # data-science (2)
- # datalevin (6)
- # datomic (49)
- # gratitude (1)
- # helix (24)
- # holy-lambda (14)
- # jobs (3)
- # lsp (92)
- # malli (7)
- # missionary (8)
- # pathom (12)
- # proletarian (3)
- # re-frame (4)
- # remote-jobs (1)
- # shadow-cljs (4)
- # spacemacs (3)
- # sql (9)
- # tools-build (90)
- # vim (1)
- # xtdb (11)
what action would one be seeing this under? is this from textDocument/signatureHelp
? textDocument/documentSymbol
?
in nvim using nvim-lsp, so trying to figure out which call I should be looking for the feature under
I got to say I’ve been longing for fancy docs after I switched to VS Code from Cursive, and am loving that it is now a thing. And if I understood correctly, it’s even better as it takes also docs for non-core packages from clojuredocs right?
Thank you! The way it works is: when server starts we async request clojuredocs and cache all available docs, then when you hover over a symbol and request clojure-lsp docs about it, clojure-lsp merge the docs from clj-kondo that already exists with docs + examples + notes + see-alsos from the clojuredocs cache if any available
so, if the symbol you request contains on http://clojuredocs.org then it should be available on clojure-lsp as well :)
I tested with calva when inplementing @U04V15CAJ
@U04V15CAJ what's your clojure-lsp --version?
is clojure-lsp correctly connected? it's not even outputing the clj-kondo doc information
actually, I think we could make clojure-lsp hover work even with projects that the classpath scan failed, I will try to improve that
rename probably didn't work because of clojure-lsp not finding the correct source-paths
I have no plans for an nbb.edn
yet though, perhaps package.json
can be considered as a project root as well
not so important for now, I already showed you one project where I solved it with a deps.edn
(defn ^:private default-project-specs []
(->> [{:project-path "project.clj"
:classpath-cmd ["lein" "classpath"]}
{:project-path "deps.edn"
:classpath-cmd ["clojure" "-A:dev:test" "-Spath"]}
{:project-path "build.boot"
:classpath-cmd ["boot" "show" "--fake-classpath"]}
{:project-path "shadow-cljs.edn"
:classpath-cmd ["npx" "shadow-cljs" "classpath"]}
{:project-path "bb.edn"
:classpath-cmd ["bb" "print-deps" "--format" "classpath"]}]
(map #(update % :classpath-cmd classpath-cmd->windows-safe-classpath-cmd))))
So I was corrected on Twitter that apparently confused http://cljdoc.org with http://clojuredocs.org, that’s why I initially was amazed in thinking that it would also show docs for other packages, which I guess is not the case then. But that brings me to a question; is it possible to add http://cljdoc.org as well or maybe it’s not a good idea?
Though maybe it makes little sense since I think most of it are just reflecting docstrings that we can see anyway. Welp, one can dream!
Yeah, I didn't even know http://cljdoc.org 😅 If they only show docstrings I think this already works ATM with clj-kondo analysis, right?
but yeah, it seems only indexes the docstring which is already available on clojure-lsp. does it allows other things like examples that are not inside the function docstring? I don't think so
It allows regular documentation, but no way to tie any of that to any particular function I think (example: https://cljdoc.org/d/lambdaisland/kaocha/1.0.937/doc/plugin-hooks)