How can I set the Workspace in Visual Studio Code so that the "intelephense" mechanism will suggest me the autocompletion for paths starting from the directory that I use as DocumentRoot (Apache), instead of starting from the VS Code Workspace Directory?
e.g.
My project (workspace) directory is called 'website'; it contains the 'public' directory, which contains index.html and style.css . If, in the html file, I start typing href="./
, where I want to link the file with the style, intelephense suggests public
, which would be wrong!
What I actually want is:
<link rel="stylesheet" href="./style.css">
since the file with the style is in the same directory of the html file that is linking to it.
So it would be correct if intelephense would suggest me style.css
, when I start typying: href="./
, instead of suggesting: public
.
I have tried this code inside the VS Code workspace file:
{
"folders": [
{
"path": "."
}
],
"settings": {
"intelephense.environment.documentRoot": "./public"
}
}
but that doesn't do the trick - I am not even sure this is the way to go.