-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Windows] Failed to start language server, generated path seems invalid #17571
Comments
Seems like a windows bug |
its svelte language server specific issue I believe and the same happens with tailwindcss for me but for the other languages it does work fine |
I am unsure, because it does the same for HTML too for me - so I am thinking it must just be an issue with how the paths are formed on Windows within Zed for whatever reason. |
maybe but it has something to do with node modules how they handle directory I didn't have any issues with Zig extension |
Perhaps - by the looks of it to me, it seems to be a problem within Zed itself passing args as |
Ok yeah, as I suspected, the prepended Ok(LanguageServerBinary {
path,
arguments: command.args.into_iter().map(|arg| arg.replace("/C:", "C:").into()).collect(),
env: Some(command.env.into_iter().collect()),
}) Here is a very rudimentary fix for my machine in |
Any updates on this? |
I'm having the exact same issue with svelte's language server, seems to be a node issue, python's language server are working fine. I'm also using deevus nightly build from https://github.com/deevus/zed-windows-builds Here's the log:
|
Extension which is downloaded from extension store could not work for now, see #15004 A temp solution: diff --git a/crates/extension/src/extension_lsp_adapter.rs b/crates/extension/src/extension_lsp_adapter.rs
index 25179acec..ccc1cbf5e 100644
--- a/crates/extension/src/extension_lsp_adapter.rs
+++ b/crates/extension/src/extension_lsp_adapter.rs
@@ -88,7 +88,17 @@ impl LspAdapter for ExtensionLspAdapter {
Ok(LanguageServerBinary {
path,
- arguments: command.args.into_iter().map(|arg| arg.into()).collect(),
+ arguments: command
+ .args
+ .into_iter()
+ .map(|arg| {
+ if let Some(arg) = arg.strip_prefix('/') {
+ arg.into()
+ } else {
+ arg.into()
+ }
+ })
+ .collect(),
env: Some(command.env.into_iter().collect()),
})
} |
The problem exists elsewhere as well. The temporary solution does not work globally. For astro it loads zed/extensions/astro/src/astro.rs Line 116 in 051627c
There should be a way to fix it without having to patch it. It is strange that the |
From my understanding, the |
The same happens for
For some reason it has |
Curious -- do you have multiple drives? I wonder if this is a multi-drive issue on Windows. Mine shows as |
My projects are in |
I'm starting to think that this might be caused by the assumption that the user has a single-drive system - maybe whatever call they make to get the file path returns just the path normally on a single drive system, and the path with the drive on multi drive systems? I'll take a look this evening, as I'm not familiar with how it determines the path currently. |
Check for existing issues
Describe the bug / provide steps to reproduce it
Whenever Zed attempts to start a language server, it seems to produce the wrong path to the
server.js
module:It can first be noticed in the
args: ["/C:\\..."]
with a prepended/
which thennode
seems to interpret as the module being located atC:\\C:\\...
In terms of reproducibility, I am unsure, I just built Zed on my machine, ran it and installed a few extensions and that was it.
Environment
Zed: v0.152.0 (Zed Dev 072513f)
OS: Windows 10.0.22631
Memory: 15.8 GiB
Architecture: x86_64
GPU: Intel(R) Iris(R) Xe Graphics || Intel Corporation || 101.5989
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your Zed.log file to this issue.
Zed.log
The text was updated successfully, but these errors were encountered: