Browse Source

vim: fix terraform

Maxim Likhachev 3 years ago
parent
commit
30a6435b44
  1. 2
      etc/soft/nvim/+ftplugin/terraform.vim
  2. 2
      etc/soft/nvim/+plugins/neomake/autoload/neomake/makers/ft/terraform.vim
  3. 2
      etc/soft/nvim/+plugins/nvim-treesitter/ftdetect/hcl.vim
  4. 2
      etc/soft/nvim/ftdetect/detect.vim

2
etc/soft/nvim/+ftplugin/terraform.vim

@ -129,7 +129,7 @@ set cpoptions&vim @@ -129,7 +129,7 @@ set cpoptions&vim
command! -nargs=+ -complete=custom,TerraformCommands -buffer Terraform
\ execute '!'.g:terraform_binary_path.' '.<q-args>.' -no-color'
" command! -nargs=0 -buffer TerraformFmt call TerraformFmt()
command! -nargs=0 -buffer TerraformFmt call TerraformFmt()
let b:undo_ftplugin .= '|delcommand Terraform|delcommand TerraformFmt'
if get(g:, 'terraform_fmt_on_save', 0)

2
etc/soft/nvim/+plugins/neomake/autoload/neomake/makers/ft/terraform.vim

@ -103,7 +103,7 @@ function! neomake#makers#ft#terraform#ProcessTfsecJSON(context) abort @@ -103,7 +103,7 @@ function! neomake#makers#ft#terraform#ProcessTfsecJSON(context) abort
for line in a:context['json']['results']
let entry = {
\ 'filename': fnamemodify(line['location']['filename'], ':t'),
\ 'text': line['rule_id'] . ': ' . line['description'] . ' ' . line['link'],
\ 'text': line['rule_id'] . ': ' . line['description'] . ' ' . join(line['links'], ', '),
\ 'lnum': line['location']['start_line'],
\ 'col': 1,
\ 'type': line['severity'],

2
etc/soft/nvim/+plugins/nvim-treesitter/ftdetect/hcl.vim

@ -1,2 +1,2 @@ @@ -1,2 +1,2 @@
autocmd BufRead,BufNewFile *.hcl set filetype=hcl
autocmd BufRead,BufNewFile *.hcl set filetype=terraform
autocmd BufRead,BufNewFile *.tf,*.tfvars set filetype=terraform

2
etc/soft/nvim/ftdetect/detect.vim

@ -11,7 +11,7 @@ au BufRead,BufNewFile *.rsc setlocal @@ -11,7 +11,7 @@ au BufRead,BufNewFile *.rsc setlocal
au BufRead,BufNewFile *.sls,Saltfile setlocal filetype=sls
au BufRead,BufNewFile *.test setlocal filetype=tcl
au BufRead,BufNewFile *.tex setlocal filetype=tex
au BufRead,BufNewFile *.tf,*.tfvars,*.hcl setlocal filetype=terraform
au BufRead,BufNewFile *.tf,*.tfvars,*.pkr.hcl,*.hcl setlocal filetype=terraform
au BufRead,BufNewFile *.tfstate setlocal filetype=json
au BufRead,BufNewFile *.timelog setlocal filetype=timelog
au BufRead,BufNewFile *.txt setlocal filetype=txt

Loading…
Cancel
Save