summaryrefslogtreecommitdiffstats
path: root/indent/terraform.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-08-14 19:15:07 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-08-14 19:15:07 +0200
commita3bdbcdb3c60a9563fb90e02b28ae46cee5ef974 (patch)
tree6e0b340417985e714838230de04d9610bdfb8677 /indent/terraform.vim
parent34e01b8b62701afbd6b4ab1ffb4057617f540dce (diff)
downloadvim-polyglot-a3bdbcdb3c60a9563fb90e02b28ae46cee5ef974.tar.gz
vim-polyglot-a3bdbcdb3c60a9563fb90e02b28ae46cee5ef974.zip
Fix svelte branch name, closes #522
Diffstat (limited to 'indent/terraform.vim')
-rw-r--r--indent/terraform.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/indent/terraform.vim b/indent/terraform.vim
index 129ec368..c035c216 100644
--- a/indent/terraform.vim
+++ b/indent/terraform.vim
@@ -49,6 +49,16 @@ function! TerraformIndent(lnum)
let thisindent -= &shiftwidth
endif
+ " If the previous line starts a block comment /*, increase by one
+ if prevline =~# '/\*'
+ let thisindent += 1
+ endif
+
+ " If the previous line ends a block comment */, decrease by one
+ if prevline =~# '\*/'
+ let thisindent -= 1
+ endif
+
return thisindent
endfunction