nvim-svelte-snippets

A collection of useful snippets for Svelte(Kit) development in Neovim using LuaSnip with TypeScript support.

March 01, 2025 11 days ago
Project categories: devtoolsluaneovimopen source
Back to projects

nvim-svelte-snippets

I created a Neovim plugin for Svelte and SvelteKit snippets since we don’t have the same snippets available in VSCode.

The plugin:

  • Detects the correct load function types based on filename (+page.ts vs +page.server.ts)
  • Only loads SvelteKit snippets in SvelteKit projects by default
  • Includes snippets for Svelte blocks and SvelteKit TypeScript files
  • Works with LuaSnip and lazy.nvim

Available snippets include Svelte template blocks (if, each, await), a page template, and TypeScript helpers for routes, endpoints, and actions.