🐛 BUG: TypeScript completions don't work after a script tag
Describe the Bug
Bit of a weird one, TypeScript tend to have trouble returning completions after/before some malformed TSX. This shouldn't be related to our script tags handling, just purely TSX.
If it turns out that this is caused by our TSX output (the shape of it, not any potential unintended syntax error), this might mean that in the future, we'd have to treat script tags like style tags, using a template literal (which would mean re-implementing some features that do work in script tags naturally such as symbols and inlay hints)
<script>
</script>
< <--- Completion at this position doesn't work, work when script tag is removed
Steps to Reproduce
- Create Astro file
- Add a script tag, even empty
- Try to get TS completions after the script tag (ex, for an imported component)
- No completions!
Not putting the label for now, but it is likely that this is simply a TSX output issue and https://github.com/withastro/language-tools/pull/335 will fix it. Not as scary anymore!
Fwiw I couldn't get string completions within the script tag also. Intellisense works great for properties, but for string literals it doesn't seem to show.
Now that we have the TSX Output mostly working, I can confirm this was a TSX output issue and it'll be solved by https://github.com/withastro/language-tools/pull/335
Fixed by https://github.com/withastro/language-tools/pull/335