Open rhenescu opened 1 year ago
FWIW file://<relative path>
seems to work for me
@thejcannon thank you for your reply! Can you please share what your settings look like? I gave it a try with:
{
"evenBetterToml.schema.associations": {
"^.*\\.app\\.toml$": "file://./src/schema/app.schema.json"
}
}
And it appears to be relative to the .vscode
folder and can't ../
out of it. This requires the schema to be present at <worskpace root>/.vscode/src/schema/app.schema.json
. What I tried to achieve was to specify a path that is relative to the workspace folder.
Looks like it works without the dot that indicates the current directory:
The hyperlink in .vscode/settings.json
is not working, but I guess I can live with that. Unless this is considered a bug, the issue can be closed from.
Many thanks for your suggestion!
Sadly the workaround suggested by @rhenescu does not work for me. Maybe it only works on Windows by accident. Getting an Error: ENOENT: no such file or directory
on macOS. Same when prefixed with ./
. Without file://
it is relative to one folder above the workspace root. This really needs to be fixed!
Thank you for creating this extension!
Using Windows 10 + VS Code 1.82.2 + Even Better TOML 0.19.2, with the following folder structure:
.vscode/settings.json
contents:Reading the LSP error in VS Code, it appears that the folder used as a base for the relative path is not the workspace root,
P:\Projects\App
, but one level above,P:\Projects
. Because of this, it tries to read the schema fromP:\Projects\src\schema\app.schema.json
which doesn't exist, instead ofP:\Projects\App\src\schema\app.schema.json
where it's actually located.Also experienced the same issue mentioned in https://github.com/tamasfe/taplo/issues/377#issuecomment-1657494623: I have to delete
%APPDATA%\Code\User\globalStorage\tamasfe.even-better-toml
and reload the VS Code on every schema-related path change. TheJSON: Clear Schema Cache
command has no effect.