2024-03-07 02:59:38 -08:00
|
|
|
local Util = require("lazyvim.util")
|
|
|
|
|
2023-07-06 20:46:34 +03:00
|
|
|
return {
|
|
|
|
{
|
|
|
|
"nvim-treesitter/nvim-treesitter",
|
|
|
|
opts = function(_, opts)
|
|
|
|
if type(opts.ensure_installed) == "table" then
|
|
|
|
vim.list_extend(opts.ensure_installed, {
|
|
|
|
"terraform",
|
|
|
|
"hcl",
|
|
|
|
})
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"neovim/nvim-lspconfig",
|
|
|
|
opts = {
|
|
|
|
servers = {
|
|
|
|
terraformls = {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2023-09-29 04:52:45 -05:00
|
|
|
"nvimtools/none-ls.nvim",
|
2023-09-29 11:59:05 +02:00
|
|
|
optional = true,
|
2023-07-06 20:46:34 +03:00
|
|
|
opts = function(_, opts)
|
2023-10-10 22:12:33 +02:00
|
|
|
local null_ls = require("null-ls")
|
|
|
|
opts.sources = vim.list_extend(opts.sources or {}, {
|
|
|
|
null_ls.builtins.formatting.terraform_fmt,
|
|
|
|
null_ls.builtins.diagnostics.terraform_validate,
|
|
|
|
})
|
2023-07-06 20:46:34 +03:00
|
|
|
end,
|
|
|
|
},
|
2023-09-29 15:05:01 +02:00
|
|
|
{
|
|
|
|
"mfussenegger/nvim-lint",
|
|
|
|
optional = true,
|
|
|
|
opts = {
|
|
|
|
linters_by_ft = {
|
|
|
|
terraform = { "terraform_validate" },
|
|
|
|
tf = { "terraform_validate" },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2023-09-29 13:37:00 +02:00
|
|
|
{
|
|
|
|
"stevearc/conform.nvim",
|
|
|
|
optional = true,
|
|
|
|
opts = {
|
|
|
|
formatters_by_ft = {
|
|
|
|
terraform = { "terraform_fmt" },
|
|
|
|
tf = { "terraform_fmt" },
|
|
|
|
["terraform-vars"] = { "terraform_fmt" },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2024-03-07 02:59:38 -08:00
|
|
|
{
|
|
|
|
"nvim-telescope/telescope.nvim",
|
|
|
|
dependencies = {
|
|
|
|
{
|
|
|
|
"ANGkeith/telescope-terraform-doc.nvim",
|
|
|
|
config = function()
|
|
|
|
Util.on_load("telescope.nvim", function()
|
|
|
|
require("telescope").load_extension("terraform_doc")
|
|
|
|
end)
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cappyzawa/telescope-terraform.nvim",
|
|
|
|
config = function()
|
|
|
|
Util.on_load("telescope.nvim", function()
|
|
|
|
require("telescope").load_extension("terraform")
|
|
|
|
end)
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2023-07-06 20:46:34 +03:00
|
|
|
}
|