blob: d6b8b1ad8a620e75694d9b8730312c2d7e99e60e [file] [log] [blame]
Gregory Anders150b5072024-09-04 22:19:45 +02001" Vim indent file
2" Language: HCL
3" Maintainer: Gregory Anders
4" Upstream: https://github.com/hashivim/vim-terraform
Gregory Andersc8b7e612025-05-25 17:01:45 +02005" License: ISC
Gregory Anders150b5072024-09-04 22:19:45 +02006" Last Change: 2024-09-03
Gregory Andersc8b7e612025-05-25 17:01:45 +02007"
8" Copyright (c) 2014-2016 Mark Cornick <mark@markcornick.com>
9"
10" Permission to use, copy, modify, and/or distribute this software for any purpose
11" with or without fee is hereby granted, provided that the above copyright notice
12" and this permission notice appear in all copies.
13"
14" THE SOFTWARE IS PROVIDED 'AS IS' AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
15" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
16" FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
17" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
18" OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19" TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
20" THIS SOFTWARE.
Gregory Anders150b5072024-09-04 22:19:45 +020021
22if exists('b:did_indent')
23 finish
24endif
25let b:did_indent = 1
26
27setlocal autoindent shiftwidth=2 tabstop=2 softtabstop=2 expandtab
28setlocal indentexpr=hcl#indentexpr(v:lnum)
29setlocal indentkeys+=<:>,0=},0=)
30
31let b:undo_indent = 'setlocal ai< sw< ts< sts< et< inde< indk<'