Go to file
Nulo 54e66fcb6a Fix jumping to errors when paths contain a dash 2022-01-02 17:29:10 -03:00
rc Fix jumping to errors when paths contain a dash 2022-01-02 17:29:10 -03:00
README.md Where to send contributions 2021-07-09 01:53:25 +00:00

README.md

zig.kak

Useful tools for developing Zig on Kakoune. Note that Kakoune already includes Zig syntax highlighting by default.

Inspired by make.kak and grep.kak.

Issues, patches, death threats

Send a (nice) email to hi@nulo.in.

Commands

zig-run [arguments]: wrapper for zig build run

All the optional arguments are forwarded to zig build run.

Runs zig build run and opens the result in a buffer with basic syntax highlighting for errors, also allows going to the position of the errors by pressing Return.

zig-auto-run <scope>: automatically run zig-run on save

Add this to your kakrc to apply this when opening any Zig file:

hook global WinSetOption filetype=zig %{ zig-auto-run buffer }

new-tools: open a new client for tools (make.kak, grep.kak, zig.kak) to use for output

Also sets the current client to be the one to go back to when jumping to an error.

Also useful

Set the formatter for Zig files to zig fmt:

hook global WinSetOption filetype=zig %{
    set-option buffer formatcmd 'zig fmt --stdin'
    # Optionally format every time we save
    #hook buffer BufWritePre .* format-buffer
}