Fork me on GitHub
#calva
<
2023-02-23
>
bringe02:02:29

Not currently, but it’s probably possible to implement in Calva. Feel free to create an issue for it.

👍 2
pez10:02:40

Might be something for clojure-lsp to implement too.

pez10:02:18

Haha, Eric usually shows up pretty quickly at the mere mention of clojure-lsp. 😃

2
ericdallo13:02:18

that's something it's expected to work in a LSP hover request, but the spec only mentions support for markdown and that's why [[my-link]] is not recognized, you can see changing to [my-link](real-link) works

ericdallo13:02:34

if we really want to support this custom format like cider, would need to make changes for every client, like calva, lsp-mode, vim etc and some of them are generic enough to not be easy to support that, so maybe as last resource, clojure-lsp could convert [[my-link]] to [my-link](my-link) and that would probably make work for everyone

ericdallo13:02:48

is that format that common/important @U0ENYLGTA?

dchelimsky14:02:07

It would be if it worked across clients 🙂

dchelimsky14:02:59

It's super helpful because you get active links directly to other functions (if you're in an editor) or other docs (if you're reading codox-generated docs).

dchelimsky14:02:11

I wouldn't call this urgent! But I think it'd be useful.

ericdallo14:02:29

I think we can do a simple replace on clojure-lsp side to support that on all clients, makes sense, would you mind open an issue on clojure-lsp?

dchelimsky15:02:21

Actually, would that even work? Codox transforms [[<symbol>]] into a link to the doc for that symbol. I don't think converting that to [<symbol>](<symbol>) would result in a usable link.

ericdallo15:02:29

oh, didn't know about that, so it's more complex, I'm not familiar with codox, not sure how it works

ericdallo15:02:49

it seems it kind of find the element between quotes and build something like [<symbol>](<the-result-of-finding-symbol>) right?

ericdallo15:02:15

hum, we could make clojure-lsp find the definition of symbol and build that url, but would need a little bit more testing if that is enough

ericdallo15:02:49

but it's something that is interesting for all docs that use quotes indeed, which is pretty common

dchelimsky16:02:26

I hadn't thought of that! Imagine clicking through from "some doc that references another-function! One problem would be how to select the function in the face of unqualified symbols, or, worse, qualified symbols that use random aliases.

ericdallo16:02:22

I think that's expected, clojure-lsp already handles find-definition for most everything, so if nothing is found we don't link it, probably will work for most things quoted, worth the try I think

ericdallo16:02:43

Quite a nice feature indeed :)

2