We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
${workspaceFolder:x}
1 parent a2ddc19 commit 41ffcf2Copy full SHA for 41ffcf2
script/files.lua
@@ -945,6 +945,17 @@ function m.resolvePathPlaceholders(path)
945
elseif key:sub(1, 4) == "env:" then
946
local env = os.getenv(key:sub(5))
947
return env
948
+ elseif key == "workspaceFolder" then
949
+ local ws = require 'workspace'
950
+ return ws.rootUri and furi.decode(ws.rootUri)
951
+ elseif key:match("^workspaceFolder:.+$") then
952
+ local folderName = key:match("^workspaceFolder:(.+)$")
953
+ for _, scp in ipairs(scope.folders) do
954
+ if scp:getFolderName() == folderName then
955
+ return scp.uri and furi.decode(scp.uri)
956
+ end
957
958
+ log.warn(('variable ${%s} cannot be resolved when processing path: %s'):format(key, path))
959
end
960
end)
961
0 commit comments