Added relative workspace setting.#89
Added relative workspace setting.#899brada6 wants to merge 1 commit intoTysonAndre:masterfrom 9brada6:master
Conversation
|
@TysonAndre please consider merging this. |
TysonAndre
left a comment
There was a problem hiding this comment.
https://code.visualstudio.com/updates/v1_57 VS Code 1.57 added support for the IDE itself tracking whether a workspace and its config is trusted, this functionality should be fine in combination with bumping the minimum version of vs code
| return conf; | ||
| } | ||
|
|
||
| for (let i = 0; i < conf.length; i++) { |
There was a problem hiding this comment.
Would prefer https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map to be easier to test (not modify original input) but otherwise seems reasonable.
Now that vs code supports marking folders as trusted outside of extensions there's less of a need to manually list workplaces to trust.
|
|
||
| for (let i = 0; i < conf.length; i++) { | ||
| conf[i] = conf[i].replace(/\$\{workspaceFolder\}/gi, vscode.workspace.workspaceFolders[0].uri.fsPath).replace(/\\/gi, '/'); | ||
| } |
There was a problem hiding this comment.
Could deduplicate if strings are exactly the same if workspaceFolder is the same directory as a hardcoded path
(e.g. convert to Set and back, or https://lodash.com/docs#uniq, or manually)
As described in the last comment #79 , I dunno if you saw it...