Skip to content

fix(language-server): defer HTML expression completions to TS#15927

Open
FelmonFekadu wants to merge 1 commit intowithastro:mainfrom
FelmonFekadu:fix/href-attribute-expression-completions
Open

fix(language-server): defer HTML expression completions to TS#15927
FelmonFekadu wants to merge 1 commit intowithastro:mainfrom
FelmonFekadu:fix/href-attribute-expression-completions

Conversation

@FelmonFekadu
Copy link

Summary

  • let the HTML plugin return null when completion is requested inside a brace expression so the TypeScript service can handle it
  • add a regression test covering completions in HTML attribute expressions like href={some}
  • add a changeset for the language server fix

Fixes #14671.

Testing

  • pnpm -C packages/language-tools/language-server build
  • pnpm -C packages/language-tools/language-server exec astro-scripts test test/typescript/completions.test.ts --teardown-test ./test/misc/teardown.ts --tsx true --setup ./test/setup.js
  • pnpm -C packages/language-tools/language-server exec astro-scripts test test/html/completions.test.ts --teardown-test ./test/misc/teardown.ts --tsx true --setup ./test/setup.js
  • pnpm -C packages/language-tools/language-server exec astro-scripts test test/{html/completions.test.ts,typescript/completions.test.ts} --teardown-test ./test/misc/teardown.ts --tsx true --setup ./test/setup.js

@changeset-bot
Copy link

changeset-bot bot commented Mar 15, 2026

🦋 Changeset detected

Latest commit: 5e22ac8

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

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.

🐛 BUG: No type support/suggestions when using {} for href.

1 participant