Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why VSCode IntelliSense is not working with .astro files?

I have a Astro project with Qwik and TypeScript, but my Ctrl + Space is not working as expected.

Screenshots: IntelliSense not working with Benefit component

/* benefit.astro */

type Props = {
    title: string;
    content: string;
    horizontalInvertion?: boolean;
}

const { title, content, horizontalInvertion } = Astro.props;

It only suggests when I start typing something

I've already tried:

  • Restart VSCode
  • Uninstall and install Astro extension
like image 387
fellipeutaka Avatar asked Oct 19 '25 13:10

fellipeutaka


2 Answers

This worked for me. Click the shield icon turn on the trust workspace and it worked:

screenshot

like image 133
Thiagaraj Avatar answered Oct 22 '25 03:10

Thiagaraj


After trying several things like reinstalling, deleting files and so on...

What did solve it was to add "class" in "tailwindCSS.classAttributes" array, in your settings.json.

And I also had every other recommended setting like "tailwindCSS.includeLanguages": {"astro": "html"}, etc.

like image 26
delacrucen Avatar answered Oct 22 '25 04:10

delacrucen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!