{"id":18321312,"url":"https://github.com/levenrok/zig-znippets","last_synced_at":"2026-04-29T19:04:59.280Z","repository":{"id":201138916,"uuid":"706657900","full_name":"levenrok/zig-znippets","owner":"levenrok","description":"Zig Code Snippets for VSCode","archived":false,"fork":false,"pushed_at":"2026-02-08T03:47:40.000Z","size":98,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-24T14:42:01.524Z","etag":null,"topics":["snippets","visual-studio-code","vscode","vscode-extension","zig"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=levrotech.zig-znippets","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/levenrok.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-18T11:32:13.000Z","updated_at":"2026-02-08T03:43:14.000Z","dependencies_parsed_at":"2024-05-31T18:28:53.941Z","dependency_job_id":"f2cd6473-e973-40c3-a7c2-ad1a7ac2b273","html_url":"https://github.com/levenrok/zig-znippets","commit_stats":null,"previous_names":["levrotech/zig-znippets","levenrok/zig-znippets"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/levenrok/zig-znippets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levenrok%2Fzig-znippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levenrok%2Fzig-znippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levenrok%2Fzig-znippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levenrok%2Fzig-znippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levenrok","download_url":"https://codeload.github.com/levenrok/zig-znippets/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levenrok%2Fzig-znippets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32439352,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["snippets","visual-studio-code","vscode","vscode-extension","zig"],"created_at":"2024-11-05T18:19:00.016Z","updated_at":"2026-04-29T19:04:59.250Z","avatar_url":"https://github.com/levenrok.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"[![VSCode Extension](https://img.shields.io/badge/VSCode-Extension-blue)](https://marketplace.visualstudio.com/items?itemName=levrotech.zig-znippets)\n[![Open-VSX Extension](https://img.shields.io/badge/Open--VSX-Extension-purple)](https://open-vsx.org/extension/levrotech/zig-znippets)\n[![Create Release](https://github.com/levrotech/zig-znippets/actions/workflows/release.yaml/badge.svg)](https://github.com/levrotech/zig-znippets/actions/workflows/release.yaml)\n\n# Znippets\n\nThis extension contains code snippets for Ziglang for [VSCode][code].\n\n## Snippets\n\nBelow is a list of all available snippets and the triggers of each one. Snippets are categorized into the following 📑:\n\n- Standard Library\n- Variables\n- Pointers\n- Types\n- Loops\n\nThese snippets also contain a helpful description that can further provide you with more information to help you code better 😎\n\nSome snippets have not been added since ZLS provides an ergonomic and always updated version of them 💪\n\n\u003e **_NOTE:_**  The **⇥** means the `TAB` key.\n\n### Standard Library\n\n| Trigger  | Content | Preview |\n| :-------: | ------- | -------- |\n| `imstd⇥`   | import the standard library into the current scope | `const std = @import (\"std\");` |\n| `writer⇥`   | add the writer to the standard output | `const stdout = std.io.getStdOut.writer();` |\n\n### Variables\n\n| Trigger  | Content | Preview |\n| :-------: | ------- | -------- |\n| `const⇥`   | declare a constant | `const name: type = ;` |\n| `var⇥`   | declare a variable | `var name: type = ;` |\n\n### Pointers\n\n| Trigger  | Content | Preview |\n| :-------: | ------- | -------- |\n| `ptr⇥`   | declare a pointer | `const name_ptr: *type = \u0026;` \u003cbr\u003e `var name_ptr: *type = \u0026;` |\n| `ptrλ⇥`   | declare a pointer constants | `const name_ptr: *const type = \u0026;` |\n\n### Types\n\n| Trigger  | Content | Preview |\n| :-------: | ------- | -------- |\n| `fn⇥`   | declare a function | `fn name() void {}` |\n| `fn!⇥`   | declare a function with an error union type | `fn name() !void {}` |\n| `pfn⇥`   | declare a public function | `pub fn name() void {}` |\n| `pfn!⇥`   | declare a public function with an error union type | `pub fn name() !void {}` |\n| `arr⇥`   | declare an array | `const name = [_]type{};` \u003cbr\u003e `var name = [_]type{};` |\n| `matrix⇥`   | declare a multidimensional array | `const name = [_][_]type{[_]u8{}};` \u003cbr\u003e `var name = [_][_]type{[_]u8{}};` |\n| `err⇥`   | declare an error set | `const Error = error {};` |\n| `opt⇥`   | declare a optional | `const name: ?type = ;` \u003cbr\u003e `var name: ?type = ;` |\n| `enum⇥`   | declare an enum | `const Enum = enum {};` |\n| `union⇥`   | declare an union | `const Union = union {};` |\n| `struct⇥`   | declare a struct | `const Struct = struct {};` |\n\n### Loops\n\n| Trigger  | Content | Preview |\n| :-------: | ------- | -------- |\n| `while⇥`   | add a while loop | `while() : () {}` |\n| `switch⇥`   | add a switch statement | `switch () {}` |\n\n[code]: https://code.visualstudio.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevenrok%2Fzig-znippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevenrok%2Fzig-znippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevenrok%2Fzig-znippets/lists"}