p5.vscode icon indicating copy to clipboard operation
p5.vscode copied to clipboard

Feature request: project-local types file

Open refactorized opened this issue 4 years ago • 1 comments

Currently creating a new project results in this generated jsconfig.json file

{
  "include": [
    "*.js",
    "libraries/*.js",
    "/Users/adam/.vscode/extensions/samplavigne.p5-vscode-1.2.4/p5types/global.d.ts"
  ]
}

Which references the types file by an absolute path that includes a user name. I will have to copy this to a local directory if I want to put it on git or share it with others. As there is already a libraries directory in a new project, could the types file be created there as well, and referenced with a relative path in the config file?

This could be a toggleable option, but I don't see too much problem in just having the file copied in by default.

Thanks

refactorized avatar Dec 19 '20 20:12 refactorized

Good idea! When I made this I was trying to minimize how many files the project required, and at the time it seemed to make more sense to simply add the json file rather than the type definitions... Will definitely consider adding this in, and of course feel free to make a pull request if you are so inclined.

antiboredom avatar Dec 21 '20 21:12 antiboredom