vscode-drawio
vscode-drawio copied to clipboard
`hediet.vscode-drawio.plugins` paths don't resolve properly with WSL2
Normally the .vscode/settings.json file will be something like this:
{
"hediet.vscode-drawio.plugins": [
{
"file": "${workspaceFolder}/my-plugin.js"
}
]
}
This works fine with windows, but if I open vscode from within WSL2, then hediet.vscode-drawio.plugins
won't resolve the path to ${workspaceFolder}/my-plugin.js
properly and the user sees an error message like:
The current workaround is to use a hard coded windows specific absolute path:
{
"hediet.vscode-drawio.plugins": [
{
"file": "C:\\some_path\\another_path\\my-plugin.js" // not ideal
}
]
}
Does this make sense? I can create a gif showing how to reproduce the problem if that would help.
The path is resolved here: https://github.com/hediet/vscode-drawio/blob/master/src/Config.ts#L591
However, the StateSmith-drawio-plugin should be distributed as VS Code extension. VS Code Extensions can extend this drawio extension through this API: https://github.com/hediet/vscode-drawio/blob/master/src/DrawioExtensionApi.ts#L35
Here is an example of such an extension: https://github.com/nopeslide/drawio_mermaid_plugin/tree/master/vscode
Thanks! That's great news. I didn't realize that was possible.
It might take me a while to get to creating a vs code extension. Is it OK to rely on the settings.json "hediet.vscode-drawio.plugins"
until then? I'm preparing to recommend that all StateSmith users migrate to using this.
It would be awesome if you could come up with a PR to fix this bug!
I'm starting to shift my StateSmith efforts into attracting and supporting contributors. Hopefully a new StateSmith contributor will help solve this issue. If not, I'll do it. I love programming, but there's only so much time in a day :)