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-language-server does not working when using workspaces #12019

Open
1 task done
joshuaia opened this issue May 18, 2024 · 4 comments
Open
1 task done

vue-language-server does not working when using workspaces #12019

joshuaia opened this issue May 18, 2024 · 4 comments
Labels
defect [core label] language server An umbrella label for all language servers language An umbrella label for all programming languages syntax behaviors vue Vue.js framework support

Comments

@joshuaia
Copy link

joshuaia commented May 18, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

After moving vue support from Zed to extension, in workspace dependent repositories vue-language-server stopped working.

To reproduce:

  1. Clone https://github.com/hoppscotch/hoppscotch
  2. Install all packages from root of the project using pnpm i (you may see some errors after the installation ends, you can skip them, they does not effect on this reproduction)
  3. Navigate to any vue file (for example inside pages in hoppscotch-sh-admin package)
  4. Zed will notify you in status bar about downloading vue-language-server
  5. After downloading will finish try to hover on some code inside ts script block, it won't work. BTW I can't see any logs and related errors, it feels like vue server is not installed at all.

It happens only for vue-language-server, ts server works well, you can try to open any ts file in this repo and you will see it in action.

Environment

Zed: v0.135.2 (Zed)
OS: macOS 14.5.0
Memory: 16 GiB
Architecture: aarch64

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

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

@joshuaia joshuaia added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels May 18, 2024
@JosephTLyons JosephTLyons added language An umbrella label for all programming languages syntax behaviors 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 May 19, 2024
@mtorromeo
Copy link

I have a similar issue with this error in console:

[2024-06-10T10:25:16 02:00 ERROR project] failed to start language server "vue-language-server": Request initialize failed with message: Can't find typescript.js or tsserverlibrary.js in node_modules/typescript/lib
[2024-06-10T10:25:16 02:00 ERROR project] server stderr: Some("")
[2024-06-10T10:25:16 02:00 ERROR project] Hit 4 reinstallation attempts for "vue-language-server"
[2024-06-10T10:25:16 02:00 ERROR util] crates/lsp/src/lsp.rs:782: oneshot canceled

In my case I am not using a workspace but Zed is opened on a monorepo with 2 distinct vue apps in subfolders (eg. app1/package.json, app2/package.json) but the plugin is only looking for node_modules/typescript/lib in the root folder.

If I open only one of the 2 apps directly in Zed everything works correctly

@bitfactory-oussama-fadlaoui

1 whenever opening a project with the frontend inside of the project folder that's opened (e.g. in a headless application with /frontend and /backend)

@maxdeviant
Copy link
Member

maxdeviant commented Jul 18, 2024

@joshuaia I was able to reproduce the issue in v0.0.3 of the Vue extension.

Once I upgraded to v0.1.0 of the extension (which was released earlier today), things seem to be working as expected.

Could you give it a try with v0.1.0 and see if that fixes your issue?


Also, thank you so much for including a clear repro and an example project. It made it very easy for me to test!

@joshuaia
Copy link
Author

@maxdeviant thanks a lot!
It works perfectly. I really appreciate your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] language server An umbrella label for all language servers language An umbrella label for all programming languages syntax behaviors vue Vue.js framework support
Projects
None yet
Development

No branches or pull requests

5 participants