nvim: configure Neoformat for tfvars files

This commit is contained in:
2025-08-03 20:33:13 -07:00
parent 6e512e0488
commit 78b54bb47b

View File

@@ -143,3 +143,16 @@ let g:neoformat_basic_format_trim = 1
" For shell formatting
let g:shfmt_opt="-ci -i 4 -sr"
" Terraform tfvars files
let g:neoformat_tfvars_terraform = {
\ 'exe': 'terraform',
\ 'args': ['fmt', '-'],
\ 'stdin': 1,
\ }
" Associate .tfvars with the 'tfvars' filetype if not already set
autocmd BufRead,BufNewFile *.tfvars set filetype=tfvars
" Enable neoformat for .tfvars using terraform fmt
let g:neoformat_enabled_tfvars = ['terraform']