This Extension adds snippets for Svelte.
Snippets for script, markup and css sections.
Example:
$if will expand to:
{#if condition}
<!-- content -->
{/if}
$eachindexkey will expand to:
{#each items as item, index (key)}
<!-- content -->
{/each}
$global will expand to:
:global() { }
Many other snippets like:
$ifelse, $each, $eachindex, $eachkey, $await, $awaitthen, $import, $transition, $animate, $easing, $motion, $store, $internal, $$if, $$block, $$, $onmount, $ondestroy, $beforeupdate, $afterupdate, $writable, $readable, $html, $state, $derived, $effect, $effectpre, $derived, $derivedby, $snippet, $render, $props, $bindable, $runes, $window, $body, $head, $debug, $html, $element, $class, $use, $useparams, $self, $namespace, $accesors, $immutable, $action, $action-params, $action-params-update, $tick, $get-context, $set-context, $dispatch, $dispatch-event, $sveltets, $doc, $modifier, $snapshot, $inspect, $inspectwith, $untrack, $stateraw, $boundary, $document
$snapshot, $inspectwith, $untrack, $stateraw, $useparams, $boundary, $document$elements to be called $element$modifier, $get-store$doc$sveltets*.svelte.js and *.svelte.ts files instead of *.js and *.ts (Remains match on *.svelte)$eachindex and $eachindexkey$internal$html, $on$svelte to $global for the CSS global snippetDo you have a request or idea for the extension. Please post it on our Discussion Board on GitHub
Determine if it's possible for a snippets extension to have a configuration option and use it so the final user can decide if they want single or double quotes
Enjoy!