mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
feat(terraform): add formatter for packer files (#4591)
## Description Adds a formatter for Packer configuration files (`ft=hcl`), a file type already partially supported by the `lang.terraform` extra. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines.
This commit is contained in:
parent
94b4219327
commit
4876d1137d
1 changed files with 2 additions and 0 deletions
|
@ -29,6 +29,7 @@ return {
|
|||
opts = function(_, opts)
|
||||
local null_ls = require("null-ls")
|
||||
opts.sources = vim.list_extend(opts.sources or {}, {
|
||||
null_ls.builtins.formatting.packer,
|
||||
null_ls.builtins.formatting.terraform_fmt,
|
||||
null_ls.builtins.diagnostics.terraform_validate,
|
||||
})
|
||||
|
@ -49,6 +50,7 @@ return {
|
|||
optional = true,
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
hcl = { "packer_fmt" },
|
||||
terraform = { "terraform_fmt" },
|
||||
tf = { "terraform_fmt" },
|
||||
["terraform-vars"] = { "terraform_fmt" },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue