diff --git a/lua/astrocommunity/pack/elixir-phoenix/README.md b/lua/astrocommunity/pack/elixir-phoenix/README.md new file mode 100644 index 000000000..948ca23bc --- /dev/null +++ b/lua/astrocommunity/pack/elixir-phoenix/README.md @@ -0,0 +1,10 @@ +# Elixir and Phoenix Pack + +Adds baseline support for Elixir/Phoenix projects. + +This plugin pack does the following: + +- Adds the `tailwindcss` AstroCommunity pack +- Adds the `elixirls` language server +- Adds the `elixir` and `heex` Treesitter parsers +- Ensures `tailwindcss` is configured for html-eex and `class:` style hinting. diff --git a/lua/astrocommunity/pack/elixir-phoenix/init.lua b/lua/astrocommunity/pack/elixir-phoenix/init.lua new file mode 100644 index 000000000..afb9a3d98 --- /dev/null +++ b/lua/astrocommunity/pack/elixir-phoenix/init.lua @@ -0,0 +1,43 @@ +return { + { import = "astrocommunity.pack.tailwindcss" }, + { + "williamboman/mason-lspconfig.nvim", + optional = true, + opts = function(_, opts) + opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "elixirls" }) + end, + }, + { + "nvim-treesitter/nvim-treesitter", + optional = true, + opts = function(_, opts) + if opts.ensure_installed ~= "all" then + opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "elixir", "heex" }) + end + end, + }, + { + "AstroNvim/astrolsp", + opts = { + config = { + tailwindcss = { + init_options = { + userLanguages = { + heex = "html-eex", + elixir = "html-eex", + }, + }, + settings = { + tailwindCSS = { + experimental = { + classRegex = { + 'class[:]\\s*"([^"]*)"', + }, + }, + }, + }, + }, + }, + }, + }, +}