Closed beanaroo closed 7 years ago
I don't think this is a bug, but rather I'd guess the underlying syntax file (in this case Terraform) isn't being used.
Unfortunately detecting and auto-using the syntaxes isn't something this plugin does at the moment, but the workaround is pretty painless.
let g:ansible_extra_syntaxes = "terraform.vim"
to your vimrc
.If you want to check and confirm syntax highlighting, you can use this monster of a mapping in your vimrc
, and then press F10 over anything that seems off. In this case; without the above fix, the highlights show no data, but with the fix, they correctly show a TerraformHeredoc.
map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
\ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
I did not think of that. Thank you so much! Works like a charm! And thanks for the mapping. Sorry for the noise!
No problem at all, glad it's working :)
Highlighting gets strange after the
<<
. I presume it's trying to do HTML related stuff? The file name issqs_queues.tf.j2
(Final product is Terraform HCL)