Skip to content

Latest commit

 

History

History
57 lines (48 loc) · 1.48 KB

README.md

File metadata and controls

57 lines (48 loc) · 1.48 KB

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

Screenshot Screenshot Screenshot Screenshot

Install

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
}

Usage

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" })

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.