• st4143-4.3.0 a6e5113c5a

    st4143-4.3.0 Stable

    corneliusio released this 2026-08-24 19:40:20 +00:00 | 2 commits to master since this release

    Modern Svelte 5 syntax

    • JavaScript-style comments between attributes: // and /* */ highlight as comments inside element and component tags, without touching unquoted values or />. (#51)
    • Component member tags of any depth: <Foo.Bar.Baz>, <foo.bar.baz>, and $ in component names, with each accessor scoped as punctuation. (#51)
    • Svelte 5 event attributes: any on* attribute with a single-expression value (onclick={...}, including on={x} and on-click={x}) is scoped as a Svelte event, styled like the on: directive and wrapped in meta.attribute-with-value.event.html. String values remain plain attributes, mirroring the compiler's is_event_attribute. (#51)
    • Runes get a dedicated scope (support.function.rune.svelte) in template expressions and in <script> / <script lang="ts">: $state(.raw|.snapshot|.eager), $derived(.by), $effect(.pre|.tracking|.root|.pending), $props(.id), $bindable, $inspect(.trace), $host. (#51)
    • Itemless each blocks: {#each expression} and {#each expression, index}. (#51)
    • Typed block bindings: {#each rows as row: Row}, as { id }: Row, {:then value: Value}, {:catch { message }: Err}. (#51)
    • Each-block as detection now matches the compiler: the last top-level as is the block's own, fixing {#each items as item (item.id as string)} and nested type assertions. (#51)
    Downloads