https://github.com/speed2exe/zig-comp-diag.nvim
neovim plugin to show diagnostic from zig compiler
https://github.com/speed2exe/zig-comp-diag.nvim
Last synced: 11 months ago
JSON representation
neovim plugin to show diagnostic from zig compiler
- Host: GitHub
- URL: https://github.com/speed2exe/zig-comp-diag.nvim
- Owner: speed2exe
- Created: 2024-02-23T08:44:40.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-19T14:31:31.000Z (about 2 years ago)
- Last Synced: 2025-04-22T14:21:17.675Z (about 1 year ago)
- Language: Lua
- Size: 280 KB
- Stars: 12
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# zig-comp-diag.nvim
- Neovim plugin to show diagnostic from zig compiler
## Background
- This project is motivated from the fact that I spent way too much time bouncing from compiler error messages to neovim.
## What it does?
- 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.
## Screenshots




## Install
Using [lazy.nvim](https://github.com/folke/lazy.nvim):
```lua
{
'speed2exe/zig-comp-diag.nvim',
config = function()
require('zig-comp-diag').setup()
end
}
```
Using [packer.nvim](https://github.com/wbthomason/packer.nvim):
```lua
use {
'speed2exe/zig-comp-diag.nvim',
config = function()
require('zig-comp-diag').setup()
end
}
```
## Usage
Using VimL:
```vim
" runs with command: zig build
:ZigCompDiag
" runs with your custome command
:ZigCompDiag zig build-exe main.zig
```
```lua
-- 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" })
```
## Note
- 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.