diff --git a/lua/astrocommunity/pack/protobuf/README.md b/lua/astrocommunity/pack/protobuf/README.md new file mode 100644 index 000000000..d53904320 --- /dev/null +++ b/lua/astrocommunity/pack/protobuf/README.md @@ -0,0 +1,7 @@ +# Protocal Buffers Pack + +This plugin pack does the following: + +- Adds `proto` Treesitter parsers +- Adds `bufls` language servers +- Adds `buf` formatter diff --git a/lua/astrocommunity/pack/protobuf/proto.lua b/lua/astrocommunity/pack/protobuf/proto.lua new file mode 100644 index 000000000..47788a8b9 --- /dev/null +++ b/lua/astrocommunity/pack/protobuf/proto.lua @@ -0,0 +1,20 @@ +local utils = require "astronvim.utils" +return { + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + -- Ensure that opts.ensure_installed exists and is a table or string "all". + if opts.ensure_installed ~= "all" then + opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "proto") + end + end, + }, + { + "williamboman/mason-lspconfig.nvim", + opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "bufls") end, + }, + { + "jay-babu/mason-null-ls.nvim", + opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "buf") end, + }, +}