mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2025-07-01 19:49:25 +00:00
[neovim] Format hcl files on save
This commit is contained in:
@ -8,6 +8,7 @@ require("conform").setup({
|
||||
python = { "isort", "black" },
|
||||
typescript = { "prettier" },
|
||||
yaml = { "prettier" },
|
||||
hcl = { "terraform_fmt" },
|
||||
},
|
||||
formatters = {
|
||||
{
|
||||
@ -16,7 +17,7 @@ require("conform").setup({
|
||||
},
|
||||
},
|
||||
format_on_save = function(bufnr)
|
||||
local filetypes = { "go", "typescript", "lua" }
|
||||
local filetypes = { "go", "typescript", "lua", "hcl" }
|
||||
if not vim.tbl_contains(filetypes, vim.bo[bufnr].filetype) then
|
||||
return
|
||||
end
|
||||
|
Reference in New Issue
Block a user