From 3c6e86337f29bf3e604a78d4c7c87ede84bd9b96 Mon Sep 17 00:00:00 2001 From: "M. Casqueira" <3946250+20k-ultra@users.noreply.github.com> Date: Sun, 2 Apr 2023 00:00:07 -0400 Subject: [PATCH] feat(pack): add prisma language pack (#111) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(pack): add prisma language pack Signed-off-by: Miguel Casqueira <20k-ultra@users.noreply.github.com> * Update lua/astrocommunity/pack/prisma/prisma.lua Co-authored-by: Micah Halter --------- Signed-off-by: Miguel Casqueira <20k-ultra@users.noreply.github.com> Co-authored-by: Miguel Casqueira <20k-ultra@users.noreply.github.com> Co-authored-by: Kai Löhnert Co-authored-by: Micah Halter --- lua/astrocommunity/pack/prisma/README.md | 6 ++++++ lua/astrocommunity/pack/prisma/prisma.lua | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 lua/astrocommunity/pack/prisma/README.md create mode 100644 lua/astrocommunity/pack/prisma/prisma.lua diff --git a/lua/astrocommunity/pack/prisma/README.md b/lua/astrocommunity/pack/prisma/README.md new file mode 100644 index 000000000..2b1996bc7 --- /dev/null +++ b/lua/astrocommunity/pack/prisma/README.md @@ -0,0 +1,6 @@ +# prisma Language Pack + +This plugin pack does the following: + +- Adds `prisma` Treesitter parser +- Adds `prismals` language servers diff --git a/lua/astrocommunity/pack/prisma/prisma.lua b/lua/astrocommunity/pack/prisma/prisma.lua new file mode 100644 index 000000000..a87777e9b --- /dev/null +++ b/lua/astrocommunity/pack/prisma/prisma.lua @@ -0,0 +1,23 @@ +local utils = require "astrocommunity.utils" +return { + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + -- Ensure that opts.ensure_installed exists and is a table or string "all". + if not opts.ensure_installed then + opts.ensure_installed = {} + elseif opts.ensure_installed == "all" then + return + end + utils.list_insert_unique(opts.ensure_installed, "prisma") + end, + }, + { + "williamboman/mason-lspconfig.nvim", + opts = function(_, opts) + -- Ensure that opts.ensure_installed exists and is a table + if not opts.ensure_installed then opts.ensure_installed = {} end + utils.list_insert_unique(opts.ensure_installed, "prismals") + end, + }, +}