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 ProtoBuf pack #330

Merged
merged 1 commit into from
Jun 29, 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
7 changes: 7 additions & 0 deletions lua/astrocommunity/pack/protobuf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Protocal Buffers Pack

This plugin pack does the following:

- Adds `proto` Treesitter parsers
- Adds `bufls` language servers
- Adds `buf` formatter
20 changes: 20 additions & 0 deletions lua/astrocommunity/pack/protobuf/proto.lua
Original file line number Diff line number Diff line change
@@ -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,
},
}