mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-23 17:28:57 +02:00
feat(extras): add terraform extra (#1030)
This commit is contained in:
parent
22c9477b96
commit
0db31c2840
1 changed files with 33 additions and 0 deletions
33
lua/lazyvim/plugins/extras/lang/terraform.lua
Normal file
33
lua/lazyvim/plugins/extras/lang/terraform.lua
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
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 = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"jose-elias-alvarez/null-ls.nvim",
|
||||||
|
opts = function(_, opts)
|
||||||
|
if type(opts.sources) == "table" then
|
||||||
|
local null_ls = require("null-ls")
|
||||||
|
vim.list_extend(opts.sources, {
|
||||||
|
null_ls.builtins.formatting.terraform_fmt,
|
||||||
|
null_ls.builtins.diagnostics.terraform_validate,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue