summaryrefslogtreecommitdiffstats
path: root/indent
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2019-06-08 13:32:04 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2019-06-08 13:32:04 +0200
commit8f2a71643a90a8aff03e69ba2b1f8fdb02cebdcf (patch)
treef35677b1c7636789fa6ffaa5aed4b7aa0e5b50d4 /indent
parentaf763ef221033974abf502ebce01a464baeca2c6 (diff)
downloadvim-polyglot-8f2a71643a90a8aff03e69ba2b1f8fdb02cebdcf.tar.gz
vim-polyglot-8f2a71643a90a8aff03e69ba2b1f8fdb02cebdcf.zip
Add hcl support, closes #403
Diffstat (limited to 'indent')
-rw-r--r--indent/hcl.vim15
1 files changed, 15 insertions, 0 deletions
diff --git a/indent/hcl.vim b/indent/hcl.vim
new file mode 100644
index 00000000..e4a16819
--- /dev/null
+++ b/indent/hcl.vim
@@ -0,0 +1,15 @@
+if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'hcl') != -1
+ finish
+endif
+
+if exists('b:did_indent')
+ finish
+endif
+
+let b:did_indent = 1
+
+" cindent seems to work adequately with HCL's brace-y syntax
+setlocal cindent
+
+" don't de-indent comments (cindent treats them like preprocessor directives)
+setlocal cinkeys-=0#