zed-industries/zed

Links in JSDoc popovers stop at dollar sign ($)

Closed this issue · 3 comments

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Links like https://svelte.dev/docs/svelte/$derived get parsed as https://svelte.dev/docs/svelte/ in JSDoc popovers. The underline stops before $ and clicking on the link takes me to the wrong page. This might also happen for other characters that are less common in URLs.

To reproduce open any Svelte 5 project and hover over a rune name like $derived.

Environment

Zed: v0.164.1 (Zed Preview)
OS: Linux Wayland endeavouros unknown
Memory: 15 GiB
Architecture: x86_64
GPU: NVIDIA GeForce GTX 1650 || NVIDIA || 565.57.01

If applicable, add mockups / screenshots to help explain present your vision of the feature

jsdoc_svelte

If applicable, attach your Zed.log file to this issue.

Zed.log

Do you have an example file / code block which triggers these popovers?

Do you have an example file / code block which triggers these popovers?

<script lang="ts">
    let num = $state(0);
</script>

<p>{num}</p>

If you hover over the $state the docs link takes you to https://svelte.dev/docs/svelte/overview not the actual docs for that rune

I can reproduce:

mkdir /tmp/svurl
cd $_
npx sv create . 

press enter a bunch of times

echo '<script lang="ts">
    let num = $state(0);
</script>

<p>{num}</p>' > src/routes/+page.svelte 

zed . src/routes/+page.svelte 

Hover over $state

Screenshot 2024-12-13 at 18 10 27

Bobs your uncle.