From ee24af7a18b153b3b8f5493b140ce6cc54692c51 Mon Sep 17 00:00:00 2001 From: Oli <57495944+owittek@users.noreply.github.com> Date: Mon, 5 Jun 2023 13:07:39 +0200 Subject: [PATCH] feat(pack): add html-css base pack (#260) * feat(pack): add html-css base pack * feat(pack): remove html-css base pack from typescript packs --- lua/astrocommunity/pack/html-css/README.md | 6 ++++++ lua/astrocommunity/pack/html-css/html-css.lua | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 lua/astrocommunity/pack/html-css/README.md create mode 100644 lua/astrocommunity/pack/html-css/html-css.lua diff --git a/lua/astrocommunity/pack/html-css/README.md b/lua/astrocommunity/pack/html-css/README.md new file mode 100644 index 000000000..1604befdc --- /dev/null +++ b/lua/astrocommunity/pack/html-css/README.md @@ -0,0 +1,6 @@ +# HTML and CSS Pack + +This plugin pack is meant as a base that is being imported by more specific web development plugin packs. It does the following: + +- Adds `html` and `css` Treesitter parsers +- Adds `html` and `css` language server diff --git a/lua/astrocommunity/pack/html-css/html-css.lua b/lua/astrocommunity/pack/html-css/html-css.lua new file mode 100644 index 000000000..3281c4a12 --- /dev/null +++ b/lua/astrocommunity/pack/html-css/html-css.lua @@ -0,0 +1,19 @@ +local utils = require "astronvim.utils" + +return { + { import = "astrocommunity.pack.json" }, + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if opts.ensure_installed ~= "all" then + opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, { "html", "css" }) + end + end, + }, + { + "williamboman/mason-lspconfig.nvim", + opts = function(_, opts) + opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, { "html", "cssls" }) + end, + }, +}