Skip to content

Commit

Permalink
zig me daddy
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzaaft committed Sep 5, 2023
1 parent bb52899 commit d95e922
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lua/astrocommunity/pack/zig/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Zig Language Pack

**Requirements:**

- git (required by zig-tools)
- curl / wget (required by zig-tools)
- Neovim (>= 0.7.x)
- ripgrep (>= 11.0)

This plugin pack does the following:

- Adds `zig` Treesitter parsers
- Adds `zls` language server
- Adds [zig-tools.nvim](https://github.com/NTBBloodbath/zig-tools.nvim)
27 changes: 27 additions & 0 deletions lua/astrocommunity/pack/zig/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
local utils = require "astronvim.utils"

return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
if opts.ensure_installed ~= "all" then
opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, { "zig" })
end
end,
},
{
"williamboman/mason-lspconfig.nvim",
opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "zls") end,
},

{
"NTBBloodbath/zig-tools.nvim",
-- Load zig-tools.nvim only in Zig buffers
ft = { "zig" },
opts = {},
dependencies = {
"akinsho/toggleterm.nvim",
"nvim-lua/plenary.nvim",
},
},
}

0 comments on commit d95e922

Please sign in to comment.