Skip to content

Commit 520498f

Browse files
authored
Merge pull request #198 from hashivim/sync-comment
sync ccomment
2 parents 8912ca1 + 6c4e75b commit 520498f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

syntax/hcl.vim

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,24 @@ syn match hclAttributeName /\<\K\k*\>/ contained
2626
syn keyword hclValueBool true false
2727

2828
syn keyword hclTodo contained TODO FIXME XXX BUG
29-
syn region hclComment start="/\*" end="\*/" contains=hclTodo,@Spell
3029
syn region hclComment start="#" end="$" contains=hclTodo,@Spell
3130
syn region hclComment start="//" end="$" contains=hclTodo,@Spell
31+
syn region hclComment start="/\*" end="\*/" contains=hclTodo,@Spell
3232

33-
""" misc.
33+
" misc.
3434
syn match hclValueDec "\<[0-9]\+\([kKmMgG]b\?\)\?\>"
3535
syn match hclValueHexaDec "\<0x[0-9a-f]\+\([kKmMgG]b\?\)\?\>"
3636
syn match hclBraces "[\[\]]"
3737

38-
""" skip \" and \\ in strings.
38+
" skip \" and \\ in strings.
3939
syn region hclValueString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=hclStringInterp
4040
syn region hclStringInterp matchgroup=hclBraces start=/\(^\|[^$]\)\$\zs{/ end=/}/ contained contains=ALLBUT,hclAttributeName
4141
syn region hclHereDocText start=/<<-\?\z([a-z0-9A-Z]\+\)/ end=/^\s*\z1/ contains=hclStringInterp
4242

43-
"" Functions.
43+
" Functions.
4444
syn match hclFunction "[a-z0-9_]\+(\@="
4545

46-
""" HCL2
46+
" HCL2
4747
syn keyword hclRepeat for in
4848
syn keyword hclConditional if
4949
syn keyword hclValueNull null
@@ -66,6 +66,9 @@ hi def link hclRepeat Repeat
6666
hi def link hclConditional Conditional
6767
hi def link hclValueNull Constant
6868

69+
" synchronize
70+
syntax sync ccomment hclComment
71+
6972
let b:current_syntax = 'hcl'
7073

7174
let &cpoptions = s:cpo_save

0 commit comments

Comments
 (0)