- Neovim plugin to show diagnostic from zig compiler
- This project is motivated from the fact that I spent way too much time bouncing from compiler error messages to neovim.
- Using your system's installed zig, this plugin will attempt to build your project using
zig build
(default) or predefined command. - This plugin then parses output from the stderr, map them into neovim diagnostic and sets them to respective buffers.
Using lazy.nvim:
{
'speed2exe/zig-comp-diag.nvim',
config = function()
require('zig-comp-diag').setup()
end
}
Using packer.nvim:
use {
'speed2exe/zig-comp-diag.nvim',
config = function()
require('zig-comp-diag').setup()
end
}
Using VimL:
" runs with command: zig build
:ZigCompDiag
" runs with your custome command
:ZigCompDiag zig build-exe main.zig
-- run with `zig build`
require('zig-comp-diag').run()
-- run with your custom zig command
require('zig-comp-diag').runWithCmd({ "zig", "build-exe", "main.zig" })
- Each command runs in background and does not block user input.
- You might need to wait a little while for commands to complete to see the diagnostics.