Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>fresh-snippetsNew to Visual Studio Code? Get it now.
fresh-snippets

fresh-snippets

joelkur

|
71 installs
| (0) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

fresh-snippets

Visual Studio Code snippets for Fresh web framework

Features

Currently has the following snippets:

Prefix Description
api, api-route Outputs an API route
comp, component Outputs snippet that can be used for page or island component
page, page-handler Outputs a page component that also has a custom API handler

Adding snippets

  1. Create a template for the snippet under templates directory
    • The file name must end with .template
  2. Add details of the snippet as a new entry to templates/details.json using the below format:
    {
      "name": "Name of the snippet",
      "prefix": ["prefixes", "for", "this", "snippet"],
      "description": "Description of the snippet"
    }
    
  3. Run npm run generate
    • This generates a new snippets/snippets.code-snippets file from the template files and details.json
  4. Commit the changes
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft