75 lines
1.6 KiB
Lua
75 lines
1.6 KiB
Lua
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 = {},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
"nvimtools/none-ls.nvim",
|
|
optional = true,
|
|
opts = function(_, opts)
|
|
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,
|
|
})
|
|
end,
|
|
},
|
|
{
|
|
"mfussenegger/nvim-lint",
|
|
optional = true,
|
|
opts = {
|
|
linters_by_ft = {
|
|
terraform = { "terraform_validate" },
|
|
tf = { "terraform_validate" },
|
|
},
|
|
},
|
|
},
|
|
{
|
|
"stevearc/conform.nvim",
|
|
optional = true,
|
|
opts = {
|
|
formatters_by_ft = {
|
|
terraform = { "terraform_fmt" },
|
|
tf = { "terraform_fmt" },
|
|
["terraform-vars"] = { "terraform_fmt" },
|
|
},
|
|
},
|
|
},
|
|
{
|
|
"nvim-telescope/telescope.nvim",
|
|
dependencies = {
|
|
{
|
|
"ANGkeith/telescope-terraform-doc.nvim",
|
|
config = function()
|
|
LazyVim.on_load("telescope.nvim", function()
|
|
require("telescope").load_extension("terraform_doc")
|
|
end)
|
|
end,
|
|
},
|
|
{
|
|
"cappyzawa/telescope-terraform.nvim",
|
|
config = function()
|
|
LazyVim.on_load("telescope.nvim", function()
|
|
require("telescope").load_extension("terraform")
|
|
end)
|
|
end,
|
|
},
|
|
},
|
|
},
|
|
}
|