aboutsummaryrefslogtreecommitdiff

Zig ⚡️ Nova

Write, build, test and debug Zig projects natively in Nova

  • Grammar, syntax highlighting, folding, navigation
  • Language intelligence provided by ZLS
  • Nova tasks for building, running, testing and debugging Zig code
  • Auto-detection of build steps in build.zig
  • Debugging provided by LLDB

This is a personal project to learn Zig, but using Nova to do so. Feedback and problem reports are greatly appreciated, you can send them to bugs@dcz.at. If something doesn’t work for you, please let me know.

Installation

* optional but recommended for full experience

The extension resolves the executables automatically via the PATH environment variable or xcrun. But you can also manually configure them in the extension settings (global) or workspace settings (which overrides the extension settings so you can have different Zig versions for different projects).

Features

Code Editing

Building & Testing

  • Tasks templates: compile, debug, run, test
  • Current Zig file – compile and run the active .zig file
  • Auto-discovery of build steps via zig build --list-steps

Debugging

Configuration

The extension strives to keep the configuration options as short as possible but as flexible as needed. If you are missing a configuration option, please let me know.

Troubleshooting

Auto-discovered tasks wont’t open the report automatically

The Current Zig file and auto-discovered zig build tasks are created programmatically. Nova’s API doesn’t support auto-opening the report for them at the moment.

ZLS isn’t working

  • Confirm ZLS is installed: which zls
  • Configure the path to ZLS manually
  • Check the extension console for errors
  • Confirm ZLS and Zig are version-compatible

Debugging isn’t working

Make sure that the Xcode Command line tools are installed or set the path to lldb-dap manually in the extension or workspace settings.

License

This extension is a personal project and is not endorsed by or affiliated with the Zig Software Foundation.

The extension’s source code is licensed under the BSD 2-Clause License.

The Zig logo is the original work of the Zig Software Foundation. It and the icon assets derived from it remain licensed under CC BY-SA 4.0.

The bundled tree-sitter grammar for Zig is sourced from github.com/tree-sitter-grammars/tree-sitter-zig and is distributed under the MIT License.