-
-
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
file.cwd
is not correctly set
#20
Comments
Isn’t it set to Also does it make sense if |
Yes, but the value provided by
Files are found first, configuration files are found from them. That means that there can be a) multiple configuration files, b) none, c) one in say, |
Maybe the workspace folders(s) could be used? https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#workspace_workspaceFolders |
Nice that LSP also has that. For Atom, the earlier linked lines (https://github.com/unifiedjs/unified-engine-atom/blob/605326d08a6d04b66aa8abf3143313f24c507699/index.js#L44-L53) uses something like that too. |
Yes, I think using |
This adds support for workspaces, which in most cases will be just a simple single workspace (sort of like a working directory on the terminal), but in more complex cases can be multiple workspaces and which change over time. The closest open workspace is chosen when processing a file, in batches of files that belong together in a workspace. For backwards compatibility with LSP 3.6.0, `event.rootUri` is also supported. Closes GH-20.
This adds support for workspaces, which in most cases will be just a simple single workspace (sort of like a working directory on the terminal), but in more complex cases can be multiple workspaces and which change over time. The closest open workspace is chosen when processing a file, in batches of files that belong together in a workspace. For backwards compatibility with LSP 3.6.0, `event.rootUri` is also supported. Closes GH-20.
Initial checklist
Affected packages and versions
latest
Link to runnable example
No response
Steps to reproduce
cwd
is not set when creating a file or when creating an engine.file.cwd
must be set to the folder that is the “workplace”, e.g., the place where thepackage.json
and.git
are typically.Right now, it’s not set, so it’s (90% sure) set to a wrong value. Which means certain plugins break (example: https://github.com/remarkjs/remark-usage/blob/ae591a38bfb5424a802f25ae77b69f5dc06836fa/lib/index.js#L13-L27)
Expected behavior
Here’s how I found a logical one for atom: https://github.com/unifiedjs/unified-engine-atom/blob/605326d08a6d04b66aa8abf3143313f24c507699/index.js#L44-L53
Actual behavior
(unknown behavior, likely broken plugins or unexpected results)
Runtime
No response
Package manager
No response
OS
No response
Build and bundle tools
No response
The text was updated successfully, but these errors were encountered: