neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

hcl.vim (1225B)


      1 " Vim indent file
      2 " Language:    HCL
      3 " Maintainer:  Gregory Anders
      4 " Upstream:    https://github.com/hashivim/vim-terraform
      5 " License:     ISC
      6 " Last Change: 2024-09-03
      7 "
      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.
     21 
     22 if exists('b:did_indent')
     23  finish
     24 endif
     25 let b:did_indent = 1
     26 
     27 setlocal autoindent shiftwidth=2 tabstop=2 softtabstop=2 expandtab
     28 setlocal indentexpr=hcl#indentexpr(v:lnum)
     29 setlocal indentkeys+=<:>,0=},0=)
     30 
     31 let b:undo_indent = 'setlocal ai< sw< ts< sts< et< inde< indk<'