As far as I can tell from the tests for HTML path completion when the feature was added in 2018, path completion always uses the workspace root as the base URL for paths beginning with /; note under Verify it says:
- / shows file/folders from workspace root (test on multi root too)
This is often not very practical, though, because absolute HTML/CSS paths by definition start from the website’s document root, which is frequently not the same as the VSCode workspace’s root. For instance, in workspaces that are structured according to many common MVC patterns, path completion will not work for absolute paths since, within the workspace, the path it should start from is really /public (or /web or whatever), not /.
I can’t find any settings in VSCode that relate to HTML/CSS path completion (html.completion.attributeDefaultValue is the closest, and that’s something else entirely). I haven’t even been able to find an extension that provides this functionality.
Is there a way to specify a path within the workspace that should be used as the base URL for HTML/CSS path completions?