diff --git a/lua/astrocommunity/pack/terraform/README.md b/lua/astrocommunity/pack/terraform/README.md new file mode 100644 index 000000000..413804b98 --- /dev/null +++ b/lua/astrocommunity/pack/terraform/README.md @@ -0,0 +1,7 @@ +# Terraform Language Pack + +This plugin pack does the following: + +- Adds `terraform` Treesitter parser +- Adds `terraformls` language server +- Adds `tflint` and `tfsec` linters diff --git a/lua/astrocommunity/pack/terraform/terraform.lua b/lua/astrocommunity/pack/terraform/terraform.lua new file mode 100644 index 000000000..35c32eb02 --- /dev/null +++ b/lua/astrocommunity/pack/terraform/terraform.lua @@ -0,0 +1,21 @@ +local utils = require "astronvim.utils" +return { + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if opts.ensure_installed ~= "all" then + opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "terraform") + end + end, + }, + { + "williamboman/mason-lspconfig.nvim", + opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "terraformls") end, + }, + { + "jay-babu/mason-null-ls.nvim", + opts = function(_, opts) + opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, { "tflint", "tfsec" }) + end, + }, +}