Skip to content

fix(language-server): strip AstroComponent suffix from Svelte and Vue auto-imports - #17542

Open
IAmYhvr wants to merge 1 commit into
withastro:mainfrom
IAmYhvr:strip-astrocomponent
Open

fix(language-server): strip AstroComponent suffix from Svelte and Vue auto-imports#17542
IAmYhvr wants to merge 1 commit into
withastro:mainfrom
IAmYhvr:strip-astrocomponent

Conversation

@IAmYhvr

@IAmYhvr IAmYhvr commented Jul 29, 2026

Copy link
Copy Markdown

Changes

  • Fix a regression introduced in fix(language-server): rewrite Astro component auto-import names #15908 where auto-importing Svelte and Vue components appended "AstroComponent" to component names
  • Update names of a couple internal functions and variables to better match their fixed behavior
  • Simplify a tiny bit of logic in completions.ts coincidentally made redundant by this fix

Before:

image

After:

image

Testing

  • Tweaked two existing tests to cover .svelte and .vue imports
  • Repro'd with the latest VS Code extension (2.16.18) and verified it was fixed in the dev build

Docs

This is a bugfix, so I don't believe it needs any documentation.

@changeset-bot

changeset-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6d803dd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@astrojs/language-server Patch
astro-vscode Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant