Svelte Snippets
Svelte snippets for the Zed IDE. A collection of Svelte snippets to improve your development speed.
Snippets
How to install
With Forge Super installed, the button above opens the app on this extension, where you press Install. Nothing is installed until you do.
You can also open the Extensions panel in the app and search for Svelte Snippets. The extension's id is svelte-snippets.
Don't have Forge Super yet? Download it here.
README
From the extension's repository, written by its authors and not by Mentenaz. See the source.
Svelte Snippets for Zed
Installation
You can install this directly on the Zed extensions page or by following these steps:
-
Clone this repo:
git clone https://github.com/bobbymannino/svelte-snippets-for-zed -
Go to Extensions menu in Zed IDE
-
Click "Install Dev Extension"
-
Select the folder you cloned
Available Snippets
Svelte
sv-loop: An un-keyed loopsv-each: A svelte each loopsv-each-index: A svelte each loop with an indexsv-each-else: A svelte each loop with an else clausesv-each-else-index: A svelte each loop with an index and an else clausesv-if: A svelte if statementsv-if-else: A svelte else statementsv-props: A script (ts) tag with an empty propssv-ts: An empty script (ts) tagsv-page-props: A script (ts) tag, with props, for a svelte pagesv-layout-props: A script (ts) tag, with props, for a svelte layoutsv-style: A style tagsv-global-style: A global style tagsv-html: A @html tagsv-await: An await tagsv-then: An await then tag with no loading contentsv-await-then: An await then tag with loading contentsv-await-catch: An await catch tag with loading contentsv-await-then-catch: An await then catch tag with loading contentsv-window: A<svelte:window />tagsv-head: A<svelte:head>tagsv-on-mount: A blankonMountfunctionsv-snippet: An empty snippetsv-debug: A@debugtagsv-key: A svelte {#key} blocksv-render: A{@render}tag for rendering a snippetsv-boundary: A<svelte:boundary>with a failed snippetsv-element: A<svelte:element>dynamic element
TypeScript
sv-derived: A Svelte$derived()functionsv-await-derived: A Svelte$derived(await)functionsv-state: A Svelte$state()functionsv-effect: A Svelte$effect()functionsv-inspect: A Svelte$inspect()functionsv-handle: The boilerplate for an empty handle in the hooks.server.ts filesv-server-layout-load: The boilerplate for a load function in a +layout.server.ts filesv-client-layout-load: The boilerplate for a load function in a +layout.ts filesv-server-page-load: The boilerplate for a load function in a +page.server.ts filesv-client-page-load: The boilerplate for a load function in a +page.ts filesv-actions: The boilerplate for actions in a +page.server.ts filesv-endpoint: The boilerplate for a request handler in a +server.ts file