In the includes in my jsconfig.json
file, I want to use the tilde character ~ to expand to the current user's home directory, since I work on the same project on multiple computers with different usernames. It seems like the ~ doesn't work, however. Is there an accepted way to do this?
I've tried:
{
"include": [
"*.js",
"**/*.js",
"~/.vscode/extensions/samplavigne.p5-vscode-1.2.14/p5types/global.d.ts"
]
}
Expected to work the same as
{
"include": [
"*.js",
"**/*.js",
"/Users/mngyuan/.vscode/extensions/samplavigne.p5-vscode-1.2.14/p5types/global.d.ts"
]
}
but no typeahead suggestions appear anymore.
I see this as an XY problem. You can just
npm install -D "@types/p5~1.2.14"
.And no, I am not aware of a way to refer to abstractly refer to a user's home directory in the
include
property of a jsconfig.