withastro / language-tools

Language tools for Astro
MIT License
245 stars 46 forks source link

🐛 BUG: Other projects prompt astro refactoring #666

Open recallwei opened 9 months ago

recallwei commented 9 months ago

Describe the Bug

When I work on other projects, even non-Astro projects, the Astro plugin will prompt for refactoring. Can I disable this behavior or prompt for refactoring only when the project contains astro dependencies?

Steps to Reproduce

  1. enable astro VSCode extension
  2. open a React or Vue project
  3. try to change the location of the component which imported into the page
  4. the Astro extension prompt that should you refactor.
recallwei commented 8 months ago

First: Astro Extension wants to refactor changes by moving this file image Then: Whether to update the import of footer.tsx image Even though I'm not working on the Astro project. I had to check twice.

Princesseuh commented 8 months ago

Hmm, this is most likely coming from our TypeScript plugin being always enabled, I'd assume. Not too sure if it's because of a misconfiguration, or if we should just disable the plugin when it's not an Astro project (which, in the past, when we used to do that, caused a lot of issues)