summaryrefslogtreecommitdiffstats
path: root/syntax/terraform.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2019-07-01 16:25:37 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2019-07-01 16:25:37 +0200
commit140430ffb73d5e0851ba2df2abd29106b1677687 (patch)
tree686fc28a75cbcdddbfad4a2e93f0433614d182bc /syntax/terraform.vim
parentd52700284984ada048ce325404dfa25237271ba1 (diff)
downloadvim-polyglot-140430ffb73d5e0851ba2df2abd29106b1677687.tar.gz
vim-polyglot-140430ffb73d5e0851ba2df2abd29106b1677687.zip
Update
Diffstat (limited to 'syntax/terraform.vim')
-rw-r--r--syntax/terraform.vim11
1 files changed, 10 insertions, 1 deletions
diff --git a/syntax/terraform.vim b/syntax/terraform.vim
index eb7745e7..58c60203 100644
--- a/syntax/terraform.vim
+++ b/syntax/terraform.vim
@@ -9,6 +9,12 @@ if exists('b:current_syntax')
finish
endif
+" Identifiers are made up of alphanumeric characters, underscores, and
+" hyphens.
+if has('patch-7.4.1142')
+ syn iskeyword a-z,A-Z,48-57,_,-
+endif
+
syn case match
syn keyword terraSection connection output provider variable data terraform locals
@@ -3732,7 +3738,7 @@ syn region terraDynamicName start=/"/ end=/"/ nextgroup=terraDynamicBlock skipwh
""" misc.
syn match terraValueDec "\<[0-9]\+\([kKmMgG]b\?\)\?\>"
syn match terraValueHexaDec "\<0x[0-9a-f]\+\([kKmMgG]b\?\)\?\>"
-syn match terraBraces "[{}\[\]]"
+syn match terraBraces "[\[\]]"
""" skip \" in strings.
""" we may also want to pass \\" into a function to escape quotes.
@@ -3757,6 +3763,9 @@ syn keyword terraValueNull null
""" Terraform v0.12
syn keyword terraTodo contained TF-UPGRADE-TODO
+" enable block folding
+syn region terraBlock matchgroup=terraBraces start="{" end="}" fold transparent
+
hi def link terraComment Comment
hi def link terraTodo Todo
hi def link terraBrackets Operator