From 7fde29e07f202a04311ccb86188d6778f8c55eff Mon Sep 17 00:00:00 2001 From: Axel Calixte Date: Sat, 3 Jun 2023 00:27:52 +0200 Subject: [PATCH] feat(pack): adds angular pack --- lua/astrocommunity/pack/angular/README.md | 8 ++++++++ lua/astrocommunity/pack/angular/angular.lua | 22 +++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 lua/astrocommunity/pack/angular/README.md create mode 100644 lua/astrocommunity/pack/angular/angular.lua diff --git a/lua/astrocommunity/pack/angular/README.md b/lua/astrocommunity/pack/angular/README.md new file mode 100644 index 000000000..6b26b5f40 --- /dev/null +++ b/lua/astrocommunity/pack/angular/README.md @@ -0,0 +1,8 @@ +# Angular Language Pack + +This plugin pack does the following: + +- Adds [tsserver pack](https://github.com/AstroNvim/astrocommunity/tree/main/lua/astrocommunity/pack/typescript) +- Adds `[nvim-treesitter-angular](https://github.com/elgiano/nvim-treesitter-angular)` for `angular` Treesitter parser +- Adds `html` and `css` Treesitter parsers +- Adds `angular`, `html` and `css` language servers diff --git a/lua/astrocommunity/pack/angular/angular.lua b/lua/astrocommunity/pack/angular/angular.lua new file mode 100644 index 000000000..37e2cefd8 --- /dev/null +++ b/lua/astrocommunity/pack/angular/angular.lua @@ -0,0 +1,22 @@ +local utils = require "astronvim.utils" + +return { + { + import = "astrocommunity.pack.typescript", + }, + { "elgiano/nvim-treesitter-angular", branch = "topic/jsx-fix" }, + { + "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, { "angularls", "html", "cssls" }) + end, + }, +}