Skip to content

Commit

Permalink
feat(zig): add neotest support for zig (#928)
Browse files Browse the repository at this point in the history
* feat(zig): add neotest support for zig

* docs(zig): fix zig required version

Co-authored-by: Micah Halter <[email protected]>

---------

Co-authored-by: Micah Halter <[email protected]>
  • Loading branch information
Libsod and mehalter authored Apr 29, 2024
1 parent 6bedf02 commit 23d141b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/astrocommunity/pack/zig/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
- curl / wget (required by zig-tools)
- Neovim (>= 0.7.x)
- ripgrep (>= 11.0)
- Zig (>= 0.12.0 required for Neotest support)

This plugin pack does the following:

- Adds `zig` Treesitter parsers
- Adds `zls` language server
- Adds [neotest-zig](https://github.com/lawrence-laz/neotest-zig/tree/v1.2.0)
- Adds [zig-tools.nvim](https://codeberg.org/NTBBloodbath/zig-tools.nvim)
9 changes: 9 additions & 0 deletions lua/astrocommunity/pack/zig/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ return {
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "zls" })
end,
},
{
"nvim-neotest/neotest",
optional = true,
dependencies = { "lawrence-laz/neotest-zig", branch = "v1.2.0" },
opts = function(_, opts)
if not opts.adapters then opts.adapters = {} end
table.insert(opts.adapters, require "neotest-zig")
end,
},
{
"https://codeberg.org/NTBBloodbath/zig-tools.nvim",
-- Load zig-tools.nvim only in Zig buffers
Expand Down

0 comments on commit 23d141b

Please sign in to comment.