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 project LSP not work #10871

Closed
1 task done
d1y opened this issue Apr 22, 2024 · 11 comments · Fixed by #11743
Closed
1 task done

Vue project LSP not work #10871

d1y opened this issue Apr 22, 2024 · 11 comments · Fixed by #11743
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

@d1y
Copy link
Contributor

d1y commented Apr 22, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

/Users/d1y/Library/Application Support/Zed/extensions/work/vue

image image
Caused by:
    No such file or directory (os error 2)
[2024-04-23T06:58:11+08:00 ERROR util] crates/lsp/src/lsp.rs:768: oneshot canceled
[2024-04-23T06:58:11+08: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-04-23T06:58:11+08:00 ERROR project] server stderr: Some("")
[2024-04-23T06:58:11+08:00 ERROR project] Hit 4 reinstallation attempts for "vue-language-server"
[2024-04-23T06:59:03+08:00 ERROR util] crates/lsp/src/lsp.rs:768: oneshot canceled
[2024-04-23T07:00:57+08:00 ERROR util] crates/terminal_view/src/terminal_view.rs:285: error upgrading view
[2024-04-23T07:01:00+08:00 ERROR util] crates/lsp/src/lsp.rs:768: oneshot canceled

Environment

Zed: v0.132.2 (Zed Preview)
OS: macOS 14.4.1
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

@d1y d1y added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels Apr 22, 2024
@olrtg
Copy link
Contributor

olrtg commented Apr 22, 2024

It happened to me two days ago with Nuxt. I fixed it by installing typescript as a dev dependency of the project.

@Moshyfawn Moshyfawn 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 labels Apr 23, 2024
@JosephTLyons JosephTLyons removed the admin read Pending admin review label Apr 24, 2024
@joshuaia
Copy link

joshuaia commented May 2, 2024

Same for me, it happened after extracting vue from Zed and moving it to separate package.
It is really painful now to work without it.

@d1y
Copy link
Contributor Author

d1y commented May 2, 2024

Same for me, it happened after extracting vue from Zed and moving it to separate package. It is really painful now to work without it.

Please provide your project structure and behavioral. It may not be the same problem I encountered.

FYI: If you have a monorepo project, you can try it #9388 (comment)

@d1y d1y changed the title Vue lsp not work Project submodule vue-lsp not work May 2, 2024
@unitythemaker
Copy link

It happened to me two days ago with Nuxt. I fixed it by installing typescript as a dev dependency of the project.

This fixed my issue! However, on VSCode I didn't need to install typescript. It would be awesome if there was a notification for it or even better, without installing typescript package.

@d1y
Copy link
Contributor Author

d1y commented May 10, 2024

Strangely enough, I now find that it has not taken effect again(this happened after I completely uninstalled zed)
Even though I manually installed typescript as a dependency 🤡

Steps

  1. Create project
bun create vite my-vue-app --template vue
cd my-vue-app
bun i
  1. Open zed and install vue extension. still not working
Screen.Recording.2024-05-10.at.09.15.15.mov

Zed

Zed: v0.135.1 (Zed Preview)
OS: macOS 14.4.1
Memory: 16 GiB
Architecture: aarch64

=====================

But I found out that the official version works @mrnugget

image

@d1y d1y changed the title Project submodule vue-lsp not work Vue project LSP not work May 10, 2024
@christ-offer
Copy link

christ-offer commented May 10, 2024

Freshly installed on fedora 40 here, and Vue Language Server wont install/start:

Caused by:
    expected value at line 1 column 1
[2024-05-10T09:57:38+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-05-10T09:57:38+02:00 ERROR project] server stderr: Some("")
[2024-05-10T09:57:38+02:00 ERROR util] crates/lsp/src/lsp.rs:768: oneshot canceled
[2024-05-10T09:57:39+02:00 ERROR util] crates/language/src/language_registry.rs:885: server container removal

When I run Zed, it does not install the vue-language-server at all to the languages folder. Typescript, tailwind and ESlint are all installed tho.

@d1y
Copy link
Contributor Author

d1y commented May 12, 2024

I reconfirmed that in fact the official version of zed can work
But the preview of zed no longer works.

Zed

Zed: v0.134.4 (Zed)
OS: macOS 14.4.1
Memory: 16 GiB
Architecture: aarch64

Zed Preview

Zed: v0.135.1 (Zed Preview)
OS: macOS 14.4.1
Memory: 16 GiB
Architecture: aarch64
Screen.Recording.2024-05-13.at.02.19.57.mov

@ThatOneCalculator
Copy link
Contributor

Can repro in Zed v0.135.2 (preview) on Arch Linux x86_64

mrnugget added a commit that referenced this issue May 13, 2024
This fixes #10871.

The introduction of #11412 broke Vue.js language support, since it made
Zed rely more heavily on correct language name -> language ID mappings,
which the Vue.js extension didn't have.
mrnugget added a commit that referenced this issue May 13, 2024
This fixes #10871.

The introduction of #11412 broke Vue.js language support, since it made
Zed rely more heavily on correct language name -> language ID mappings,
which the Vue.js extension didn't have.

Release Notes:

- N/A
@d1y
Copy link
Contributor Author

d1y commented May 13, 2024

Just a note:

I know @mrnugget has fixed this issue
Thank you very much
But the Vue extension has not been updated yet.
To make it temporarily useful, please manually add it field in the file

~/Library/Application\ Support/Zed/extensions/installed/vue/extension.toml

[language_servers.vue-language-server]
# Add one line it work
language_ids = { "Vue.js" = "vue" }

@mrnugget
Copy link
Member

It has just been updated: #11747

osiewicz pushed a commit to RemcoSmitsDev/zed that referenced this issue May 18, 2024
This fixes zed-industries#10871.

The introduction of zed-industries#11412 broke Vue.js language support, since it made
Zed rely more heavily on correct language name -> language ID mappings,
which the Vue.js extension didn't have.

Release Notes:

- N/A
@icarusgk
Copy link

I'm on version 0.136.2 and had previously installed Zed. Vue LSP had suddenly stopped working in my Nuxt project, and can confirm that installing typescript as a dep solved this problem 🙌🏼

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

Successfully merging a pull request may close this issue.

10 participants