Skip to content

🐛 BUG: Import intellisense/autocomplete recognizes a new Astro component, but only once #14642

@hf02

Description

@hf02

Describe the Bug

Likely similar to #958?

If I make a new Astro component, autocomplete will pick up the new component and let me import it like usual. However, after I import that new component, if I make any more components, it won't pick any of them up and I'll have to manually write out the import.

Image Image

Reloading VSCode fixes the issue.

VSCode version: 1.105.0
Astro VSCode extension: 2.15.4
OS: Linux/NixOS

Steps to Reproduce

  1. Clone https://github.com/hf02/shaggy-sphere
  2. npm i; npm run dev
  3. Open src/pages/index.astro
  4. Create file src/components/Test1.astro
  5. Try to import Test1.astro into index.astro using autocomplete. It works!
  6. Create file src/components/Test2.astro
  7. Try to import Test2.astro into index.astro using autocomplete. It doesn't appear.

Importing the file into index.astro between file creations seems to be critical. If you make Test1.astro and Test2.astro all at once, it'll pick both up normally.

Link to Minimal Reproducible Example

https://github.com/hf02/shaggy-sphere

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P4: importantViolate documented behavior or significantly impacts performance (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions