Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pack): Add zig pack #557

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
},
},
}