Skip to content

Commit

Permalink
feat(pack): Add zig pack (#557)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzaaft authored Sep 6, 2023
1 parent ffca0d7 commit 086f3c7
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 086f3c7

Please sign in to comment.