-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
The language server cwd is not a good fallback for unified-engine
cwd
#29
Comments
Some possible solutions:
|
I personally like option 3. This also aligns with my proposed solution for #30. |
|
This is fine with me. I’ll go for this option then.
I wrote VCS (version control system), not VSC (VS Code). Anyway, I don’t think this is the ideal option.
|
🤔 what about npm/yarn workspaces?
Going to the git or svn root could be a good option as well 🤔
It's also worth noting eslint handles this by continuing to scan up until root/home folder, or until a configuration with |
I’m also open to both package.jsons and
I think it’s fine to find subpackages/submodules.
This issue is about figuring out, from a file, what “working directory” it belongs to. |
Initial checklist
Affected packages and versions
2.x
Link to runnable example
remarkjs/vscode-remark#65
Steps to reproduce
git clone git@github.com:remcohaszing/vscode-remark.git cd vscode-remark npm ci
readme.md
, add the textFoo. Bar.
Expected behavior
A diagnostic should appear
Actual behavior
No diagnostic appears.
Further inspection showed this is caused by the fact that the current working directory of the language server doesn’t reflect the file opened.
I found this out first by troubleshooting Windows. This shows the following values:
workspacesAsPaths
:C:\Users\remco\AppData\Programs\Microsoft VS Code
file.path
:z:\vs-code\readme.md
There is no correlation between the two.
I was also able to reproduce this on Linux by opening VSCode using the desktop launcher. This sets the cwd to
/home/remco
, while the file is in/home/remco/Projects/vscode-remark/readme.md
.remark
should be resolved from/home/remco/Projects/vscode-remark
, not/home/remco
.While typing this issue, I also noticed the different casing styles used for the drive letters on Windows.
Runtime
Node v16
Package manager
npm v7
OS
Other (please specify in steps to reproduce)
Build and bundle tools
esbuild
The text was updated successfully, but these errors were encountered: