diff --git a/lua/astrocommunity/pack/zig/README.md b/lua/astrocommunity/pack/zig/README.md new file mode 100644 index 000000000..77a7b37e5 --- /dev/null +++ b/lua/astrocommunity/pack/zig/README.md @@ -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) diff --git a/lua/astrocommunity/pack/zig/init.lua b/lua/astrocommunity/pack/zig/init.lua new file mode 100644 index 000000000..c5acf0965 --- /dev/null +++ b/lua/astrocommunity/pack/zig/init.lua @@ -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", + }, + }, +}