zed
zed copied to clipboard
Vue "Go to definition" no longer works
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
I thought I was doing something wrong, but started recently. Zed's command+click or right click to go to definition no longer works in Vue files.
I have tested with a brand new project with pnpm create vite and then use Vue as template.
Note that react using pnpm create vite still works.
Environment
Zed: v0.148.1 (Zed) OS: macOS 14.6.1 Memory: 16 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
https://github.com/user-attachments/assets/f8005875-12e0-4d90-acaf-93ff9a29a53d
If applicable, attach your Zed.log file to this issue.
Note in the video the first window is a React example and second is the broken experience in Vue.
related to this issue https://github.com/zed-industries/zed/issues/14723
That's funny because autocomplete works me. 🤷🏼♂️
I think you can provide the logs. I suspect that you may have installed other plugins?
Updated with logs. Attached screenshot with extensions.
This used to work. But now it is broken all my vue projects so I don't think it's related to something I am doing.
@amir20 I have also reproduced this issue and found that it seems to be caused by tailwindcss lsp(maybbbbe?) Please try disabling it After disabling it, I can work
{
// disable tailwindcss
"language_servers": ["!eslint", "!typescript-language-server", "!tailwindcss-language-server", "..."],
}
https://github.com/user-attachments/assets/695be601-ce26-42a8-934a-be2c41e7263f
Confirmed. "language_servers": ["!tailwindcss-language-server"] fixes the issue. Now the problem is, I do use Tailwind too.
Is this related to https://github.com/zed-industries/zed/issues/14723? It doesn't seem like it.
I downgraded back to 1.147.2 and go to/code navigation started working again.
I also disabled auto updating as I lost half a day due to this
Yea I think I misspoke. Even with tailwind disabled I see this happening. I am wondering if some extension got auto updated.
I also lost a lot of time. Going back to Vscode for a while.
Disabling the Tailwind extension with "language_servers": ["!tailwindcss-language-server"]
worked for me too.
I don't even have the Tailwind extension, so it doesn't work even with "language_servers": ["!tailwindcss-language-server"]
@danulqua Try adding the three dots at the end "language_servers": ["!tailwindcss-language-server", "..."]
I downgraded back to 1.147.2 and go to/code navigation started working again.
Downgrading worked for me, too. Setting "language_servers": ["!tailwindcss-language-server", "..."] did not, unfortunately.
@icarusgk didn't work. Go to definition doesn't work at all everywhere, in <template> and in <script>.
I have something that looks like a fix, waiting for the review/confirmation: https://github.com/zed-industries/zed/pull/16654
Meanwhile, using
"languages": {
"Vue.js": {
// this is a new line
"language_servers": ["vue-language-server", "..."],
"prettier": {
"allowed": true
}
},
}
could help as a workaround.
Thank you @SomeoneToIgnore, That works! 🚀
Thank you @SomeoneToIgnore for the great work.
Hello, same thing with Astro.
Used:
"languages": {
"Astro": {
"language_servers": ["astro-language-server"]
},
...
}
Astro seems to have a single language server supported, so this seems a bit unrelated: the current workaround forces a certain, primary, language server to be used first, e.g. :
"language_servers": ["vue-language-server", "..."],
which is not applicable to a single entry, really.
I understand, but the "go to definition" doesn't work in astro files (at least on my end) without explicitly setting that up.
@SomeoneToIgnore I can confirm that your workaround fixes Astro as well.
"language_servers": ["vue-language-server", "..."],
this worked for me