Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue "Go to definition" no longer works #16469

Closed
1 task done
amir20 opened this issue Aug 19, 2024 · 20 comments · Fixed by #16654
Closed
1 task done

Vue "Go to definition" no longer works #16469

amir20 opened this issue Aug 19, 2024 · 20 comments · Fixed by #16654
Labels
defect [core label] language server failure Language server doesn't work as expected language server An umbrella label for all language servers vue Vue.js framework support

Comments

@amir20
Copy link

amir20 commented Aug 19, 2024

Check for existing issues

  • 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

Zed.mp4

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

Zed.log

@amir20 amir20 added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels Aug 19, 2024
@amir20
Copy link
Author

amir20 commented Aug 19, 2024

Note in the video the first window is a React example and second is the broken experience in Vue.

@fazulk
Copy link

fazulk commented Aug 19, 2024

related to this issue #14723

@amir20
Copy link
Author

amir20 commented Aug 19, 2024

That's funny because autocomplete works me. 🤷🏼‍♂️

@d1y
Copy link
Contributor

d1y commented Aug 19, 2024

I think you can provide the logs. I suspect that you may have installed other plugins?

@amir20
Copy link
Author

amir20 commented Aug 19, 2024

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.

Screenshot 2024-08-19 at 9 59 42 AM

@d1y
Copy link
Contributor

d1y commented Aug 19, 2024

@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", "..."],
}
Screen.Recording.2024-08-20.at.01.30.08.mov

@amir20
Copy link
Author

amir20 commented Aug 19, 2024

Confirmed. "language_servers": ["!tailwindcss-language-server"] fixes the issue. Now the problem is, I do use Tailwind too.

Is this related to #14723? It doesn't seem like it.

@vknowles-rv
Copy link

vknowles-rv commented Aug 19, 2024

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

@amir20
Copy link
Author

amir20 commented Aug 19, 2024

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.

@icarusgk
Copy link

Disabling the Tailwind extension with "language_servers": ["!tailwindcss-language-server"]
worked for me too.

@danulqua
Copy link

I don't even have the Tailwind extension, so it doesn't work even with "language_servers": ["!tailwindcss-language-server"]

@icarusgk
Copy link

@danulqua Try adding the three dots at the end "language_servers": ["!tailwindcss-language-server", "..."]

@flootr
Copy link

flootr commented Aug 22, 2024

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.

@danulqua
Copy link

@icarusgk didn't work. Go to definition doesn't work at all everywhere, in <template> and in <script>.

@SomeoneToIgnore
Copy link
Contributor

I have something that looks like a fix, waiting for the review/confirmation: #16654

Meanwhile, using

"languages": {
  "Vue.js": {
    // this is a new line
    "language_servers": ["vue-language-server", "..."],
    "prettier": {
      "allowed": true
    }
  },
}

could help as a workaround.

@icarusgk
Copy link

Thank you @SomeoneToIgnore, That works! 🚀

SomeoneToIgnore added a commit that referenced this issue Aug 22, 2024
… their languages (#16654)

Follow-up of #15624

Fixes #13769
Fixes #16469

This way, those are considered "primary" and serve all LSP requests like
go to definition. Before, Tailwind language server was first and
returned nothing for all LSP requests.

- Fixed Vue and Svelte languages integrations not handling LSP requests
properly ([#13769](#13769))
([#16469](#16469))
SomeoneToIgnore added a commit that referenced this issue Aug 22, 2024
… their languages (#16654)

Follow-up of #15624

Fixes #13769
Fixes #16469

This way, those are considered "primary" and serve all LSP requests like
go to definition. Before, Tailwind language server was first and
returned nothing for all LSP requests.

- Fixed Vue and Svelte languages integrations not handling LSP requests
properly ([#13769](#13769))
([#16469](#16469))
gcp-cherry-pick-bot bot pushed a commit that referenced this issue Aug 22, 2024
… their languages (#16654)

Follow-up of #15624

Fixes #13769
Fixes #16469

This way, those are considered "primary" and serve all LSP requests like
go to definition. Before, Tailwind language server was first and
returned nothing for all LSP requests.

- Fixed Vue and Svelte languages integrations not handling LSP requests
properly ([#13769](#13769))
([#16469](#16469))
gcp-cherry-pick-bot bot pushed a commit that referenced this issue Aug 22, 2024
… their languages (#16654)

Follow-up of #15624

Fixes #13769
Fixes #16469

This way, those are considered "primary" and serve all LSP requests like
go to definition. Before, Tailwind language server was first and
returned nothing for all LSP requests.

- Fixed Vue and Svelte languages integrations not handling LSP requests
properly ([#13769](#13769))
([#16469](#16469))
@amir20
Copy link
Author

amir20 commented Aug 22, 2024

Thank you @SomeoneToIgnore for the great work.

@notpeter notpeter added language server failure Language server doesn't work as expected language server An umbrella label for all language servers vue Vue.js framework support and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Aug 22, 2024
@misaelvillaverde
Copy link

Hello, same thing with Astro.

Used:

  "languages": {
    "Astro": {
      "language_servers": ["astro-language-server"]
    },
    ...
  }

@SomeoneToIgnore
Copy link
Contributor

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.

@misaelvillaverde
Copy link

I understand, but the "go to definition" doesn't work in astro files (at least on my end) without explicitly setting that up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] language server failure Language server doesn't work as expected language server An umbrella label for all language servers vue Vue.js framework support
Projects
None yet
10 participants