-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 BUG: Widespread Intellisense Issues in Astro Projects in VS Code 1.91.0 #892
Comments
There's seems to be a VS Code regression affecting many users in the latest version of VS Code, not too sure what's going on. Some upstream issues: |
Downgrading VSCode to 1.90.2 and intellisense is working. |
Let's keep it open for other people to see |
@pjosxyz |
Does this happen for every component? For |
#879 seems to fix the issue for me locally. |
I confirm that this is now fixed in the latest version of the extension. Apologies for the inconvenience. I will note that this issue was purely dedicated to the regression in VS Code's latest version - I'm sure there's still issues with auto import that exists. Most of which are related to withastro/compiler#862, or #800 or other existing issues. I will be closing this issue as this precise issue is fixed - but understand that other issues related to auto-imports are also being looked at. |
What version of @astrojs/language-server are you using?
2.10.0
What package manager are you using
Bun - Repo: astro-min-bun
Npm - Repo: astro-min-npm
Bun: 1.1.13 / NPM: 10.7.0 / Node 20.15.0 (all WSL)
What operating system are you using
Windows10 + WSL2 (2.2.4.0) (Ubuntu 20.04.6 LTS)
(Same issues in Windows10 with Bun and NPM)
VSCode Version
1.91.0
Describe the bug
Intellisense in Astro projects is inconsistent and often doesn't work in various scenarios. The behavior seems to vary between different package managers and even within the same project.
Issues observed
Interpolating values in HTML
Intellisense not working
astro-var-intellisense-interpolate-not-working.mp4
Auto imports
Not auto-completing/importing
astro-auto-import-component.mp4
Auto finish imports in frontmatter
Inconsistent behaviour
astro-import.mp4
Seems to be quite variable in what wants to work and what doesn't, for instance:
Inconsistent behavior between Bun and NPM
In Bun: Doesn't recognize Astro components but provides correct methods
https://github.com/withastro/language-tools/assets/122515043/c4c84166-8729-445e-aa08-420dc42b594e
In NPM: Recognizes Astro components but doesn't provide methods
astro-npm-is.mp4
You can see in the video above that "prop1" doesn't get intellisense for string methods. It does in the Bun repo, but fwiw last night in a project I had started with Bun I wasn't getting intellisense so the issue seems to happen ... randomly, or feels like it does at least!
Intellisense for props
Untyped: No intellisense
astro-props.mp4
Typed: Inconsistent intellisense
astro-props-typed.mp4
Steps to Reproduce
Additional Notes
The issue seems to occur randomly, making it difficult to pinpoint the exact conditions
For comparison, intellisense works correctly in Next.js projects with the same VSCode/Node/Bun/WSL setup
next-var-intellisense-interpolate-working.mp4
next-auto-import.mp4
Long time lurker, first time Issue creator... If there's details I've missed or rules I've broken let me know 😃. Thanks!
The text was updated successfully, but these errors were encountered: