feat: support render tags, attachments, declaration tags, and snippet declarations #49
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
repos/svelte-sublime!49
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/svelte5-template-tags"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds highlighting for the remaining modern Svelte 5 template syntax (stacked on #48 for TypeScript-aware expression parsing):
{@render ...}is recognized as a special tag; the call expression after it parses normally, including optional chaining.{@attach ...}works in attribute position on elements and components, where brace attributes enter the interpolation path that previously bypassed special-tag handling.{let ...}/{const ...}declaration tags (Svelte 5.56) parse as real declarations: keyword, binding patterns (destructuring, TS annotations), and initializers.{@const ...}now shares the same binding contexts, improving destructuring.{#snippet name(params)}scopes the snippet name asentity.name.function.svelteand parses parameters as function parameters, including TS annotations, defaults, and generic type parameter lists ({#snippet pair<T>(a: T, b: T)}).Addresses findings 2, 3, and 5 of the syntax audit. Includes review fixes from gpt-5.6: dollar-prefixed snippet names (
{#snippet $row(...)}) and generic snippet signatures, both verified valid against the Svelte compiler.All referenced default-package contexts exist in ST 4143 through latest; tests pass on both.