• st4143-4.2.0 603fba77b2

    st4143-4.2.0 Stable

    corneliusio released this 2026-08-21 16:15:00 +00:00 | 4 commits to master since this release

    Modern Svelte 5 template syntax

    • Template expressions are parsed as TypeScript: typed arrow parameters (e: Event) => ..., as casts, and generic calls fn<Result>(value) highlight correctly. Plain JavaScript expressions scope exactly as before. (#48)
    • Each blocks understand TypeScript sources: only the block's own as is treated as the Svelte keyword, so {#each items as Item[] as item} and {#each (items as Item[]) as item} both highlight correctly. (#48)
    • {@render ...} tags are recognized, including optional chaining. (#49)
    • {@attach ...} attachments highlight in attribute position on elements and components. (#49)
    • {let ...} / {const ...} declaration tags (Svelte 5.56) parse as real declarations with destructuring and TypeScript annotations; {@const ...} gains the same binding handling. (#49)
    • {#snippet name(params)} scopes the name as a function definition (symbol-list navigable) and parses parameters as function parameters, including generics: {#snippet pair<T>(a: T, b: T)}. (#49)
    • The generics script attribute is highlighted as a TypeScript type parameter list, including const modifiers, constraints, and defaults. (#47)
    • Legacy special variables ($$props etc.) are no longer highlighted inside string literals. (#46)

    Tested on Sublime Text builds 4143 through the latest dev build.

    Downloads