Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Inve1951/zig-template
Base setup for zig projects with IDE glue.
https://github.com/Inve1951/zig-template
boilerplate template vscode vscode-snippets zig ziglang zls
Last synced: about 2 months ago
JSON representation
Base setup for zig projects with IDE glue.
- Host: GitHub
- URL: https://github.com/Inve1951/zig-template
- Owner: Inve1951
- Created: 2022-07-02T21:07:41.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-06T22:12:02.000Z (almost 2 years ago)
- Last Synced: 2024-10-11T12:17:44.873Z (2 months ago)
- Topics: boilerplate, template, vscode, vscode-snippets, zig, ziglang, zls
- Language: Zig
- Homepage:
- Size: 5.86 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Zig project template - v1.1
Base setup for zig projects with IDE glue.
## Features
- vscode integration
- IDE "tasks" to build and run the app and tests
- IDE "launch configurations" to debug the app, all tests, or just the tests in the currently focused zig file
- format-on-safe via `zig fmt`
- `zls` integration
- zig file templates (see below)
- TODO: cover other IDEs when their zig support gets good enough.
## Zig File Template Setup
To make use of the included templates do the follow:
- install vscode extension `Gruntfuggly.auto-snippet`
- apply machine-local settings (see `.vscode/user/settings.json`) (also needed for format-on-safe and breakpoints)
- install the templates (see `.vscode/user/snippets/zig.json`)
These get automatically applied when creating new `.zig` files. They provide typical boilerplate with smart TAB key navigation.
## Usage Notes
Set the executable name in `build.zig`.
The debugger "launch configurations" depend on the executable name matching the project's folder name.
The *debug current file's tests* launch configuration does not use `build.zig`.
Tested on Linux;
*should* work on Mac OS;
*should* work on Windows.`zls` is expected to be on $PATH. Same goes for `zig`.
---
Got any notes? Ping me in the zig discord.