Closed flying-sheep closed 3 years ago
@sindresorhus which one would you prefer? I could do a quick PR.
I'm willing to support/merge this if you want to make a PR @flying-sheep seems like a reasonable use case to me.
The only line that would need to be changed is this: https://github.com/xojs/vscode-linter-xo/blob/master/server/server.js#L464
I don't think we should use the same variable substitution that vscode uses, because I don't think we need to support any token other than workspace folder. Maybe a token like?
"path": "WORKSPACE_FOLDER/path/to/xo"
A relative path would be fine too - it just needs to be clear in the docs that if you supply an absolute path it must be in file uri format and the path will always be relative to the folder root.
Will need to change this as well: https://github.com/xojs/vscode-linter-xo/blob/master/package.json#L82
I’d prefer a relative path to a custom placeholder. The ${workspaceFolder}
idea was because it’s familiar, but so is using a relative path (e.g. for eslint.nodePath
)
sounds good @flying-sheep - I will take care of this later today If I don't see a PR.
@flying-sheep this is published now 3.7.0 - I went ahead an added a couple of lines to deprecate the file uri and made the option take an absolute path or a relative path because I felt this made more sense. Thanks for your help!
great, thank you!
There’s two possible ways to go about this:
./blah
relative paths in addition tofile://
URLs, or${workspaceFolder}
): Since inexplicably VS Code doesn’t export the mechanism it uses itself (microsoft/vscode#2809), we could use a subset of the code PythonVSCode usesOne step in the resolution of #71