nvim: configure Neoformat for tfvars files
This commit is contained in:
@@ -143,3 +143,16 @@ let g:neoformat_basic_format_trim = 1
|
|||||||
|
|
||||||
" For shell formatting
|
" For shell formatting
|
||||||
let g:shfmt_opt="-ci -i 4 -sr"
|
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']
|
||||||
|
Reference in New Issue
Block a user