zed
zed copied to clipboard
Workaround windows lsp args paths
Fix d1y/dockerfile.zed#6 #12013
Co-Authored-By: ZeroHawkeye [email protected]
Release Notes:
- Fixed windows lsp-server path
Could there be more context given? It's interesting to know where do such paths come from and why cannot we fix those properly without a workaround.
From my perspective, this PR seems dangerously close to getting closed with a message like https://github.com/zed-industries/zed/pull/11860#issuecomment-2112747921
Could there be more context given?
@ZeroHawkeye It was found that the LSP-server could not start on its Windows machine, and after joint research, it was found that the path path may have been misspelled
https://github.com/zed-industries/zed/blob/73ff7b961617198c187d4ed2ec1a66ebe1a045ce/extensions/vue/src/vue.rs#L75-L83
Among them, env:: current_dir will obtain an absolute path (is cwd, right?)
join seems to add a prefix before the path/
/C:\Users\zero\AppData\Local\Zed\extensions\work\dockerfile/node_modules/dockerfile-language-server-nodejs/bin/docker-langserver
After being handed over to node to run, this path will become(https://github.com/d1y/dockerfile.zed/issues/6#issuecomment-2119146389)
E:\C:\Users\zero\AppData\Local\Zed\extensions\work\dockerfile/node_modules/dockerfile-language-server-nodejs/bin/docker-langserver
The solution I can think of is to remove the prefix /
(https://github.com/d1y/dockerfile.zed/issues/6#issuecomment-2119158355)
After all, we cannot ask the extension author to fix this path issue themselves? 🤔
If my understanding is correct, perhaps changing the join in the extension to path.canonicalize? <examples processed?>
Hey, this may not be a Windows related issue, I can install both dockerfile and vue extentions.
Not familiar with vue, am I downloading the right extensions?
嘿,这可能不是 Windows 相关的问题,我可以安装 dockerfile 和 vue 扩展。
不熟悉 vue,我是否下载了正确的扩展?
It is indeed possible to download extensions at present. I am not sure if you can run the lsp prompt of docker, vue and other plug-ins normally? My Windows 10 will fail to start lsp due to path error.
目前确实可以下载扩展,不清楚您这边可以正常运行docker,vue等插件的lsp提示么?我这边windows10会因为路径错误启动lsp失败
Ahh, no.
Cannot find module 'C:\\C:\\Users\..
worked for me, love this, love you.
I think, the Vue not work, may not cause by this.
It's looks like this line will let the Vue server bin path to path of the Zed
started path.
As you see on my log output, the @vue\\language-server\\bin\\vue-language-server.js
has F:\\
prefix. That is the Zed.exe I was installed to: F:\Zed\Zed.exe