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-zedGo 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