Skip to content

speed2exe/zig-comp-diag.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

neovim plugin to show diagnostic from zig compiler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages