language-tools
language-tools copied to clipboard
π BUG: Changes in Typings are refreshed only if the file is located in same workspace scope
Describe the Bug
When changing typings, wether in Astro components Props
or TS / JS + d.ts libraries,
typically in a pnpm
workspace with linked packages, you will not get Typescript LSP updates, you'll have to do
the "Reload Window" command so the Astro extension can pick changes.
Also, not sure at 100% as it seems a bit random, but I've experienced hiccups in TS types updates for files located in the same workspace, too.
My comparison point is when working with TSX / TS, where it does not shows similar updates issues (it's instant).
Steps to Reproduce
-
npm init astro
using template <NAME> - ...
- ...
- ...
- Error! Describe what went wrong (and what was expected instead)...
Hello! Just a few questions to help narrow this down as cache issues are kinda hard:
- What do you mean by
workspace scope
? A npm/yarn/pnpm workspace or a VS Code one? - Where are updates not being properly seen, inside Astro files or other files?
- Does this happen reliably? I'm having trouble replicating this.
I'm gonna make more "scientific" tests to isolate those and will share my results.
By workspace scope, I mean "real files" inside the VS Code workspace (not pnpm/yarnβ¦).
It looks like symbolic links are breaking the "live wire" on which TypeScript Language Server is feeding on.
I face this same issue as well...I lose all lining,type hints, undeclared variables errors till I reload the window. I have to reload every 5mins
sometimes even reloading does not help. I upgraded everything to the latest version including ts..but yet the issue is still there.
I face this same issue as well...I lose all lining,type hints, undeclared variables errors till I reload the window. I have to reload every 5mins
sometimes even reloading does not help. I upgraded everything to the latest version including ts..but yet the issue is still there.
I don't think your issue and this issue are related, could you open another issue with as much details as possible? Thank you!
https://github.com/withastro/language-tools/pull/534 should fix this, let me know if it works on your end