language-tools
language-tools copied to clipboard
File watcher only works for default Client output path
Currently hardcoded to watch .prisma/client: https://github.com/prisma/language-tools/blob/fbc846efa2046f1ac6ffc4a2987056bf1631a23b/packages/vscode/src/plugins/prisma-language-server/index.ts#L76-L84
Meaning we would need to parse the generator block of the prisma-client-js to get the content of the "output" param, if present.
That can easily be done with "getConfig" but not from the extension unfortunately.
To be confirmed before investigating that watching the custom folder is actually needed: does TypeScript actually refreshes the types if the output is in custom dir?
Assuming the file watcher is needed to get types to work properly, types in a custom output dir should also work properly of course. (Might of course be that custom output dir avoids the problem why we have the additional file watcher in the first place)