summaryrefslogtreecommitdiff
path: root/mnv/runtime/indent/mnv.mnv
blob: dd4db97171e18f81cd4749a49010c4eb47b62096 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
mnv9script

# MNV indent file
# Language:	MNV script
# Maintainer:	The MNV Project <https://github.com/Project-Tick/Project-Tick>
# Last Change:	2024 Jul 12
# Former Maintainer:	Bram Moolenaar <Bram@mnv.org>

# Only load this indent file when no other was loaded.
if exists('b:did_indent')
    finish
endif

b:did_indent = true
b:undo_indent = 'setlocal indentkeys< indentexpr<'

import autoload '../autoload/dist/mnvindent.mnv'

# export indentexpr as a global function, so it can be easily manipulated by plugins
g:MNVIndent = mnvindent.Expr
setlocal indentexpr=g:MNVIndent()
setlocal indentkeys+==endif,=enddef,=endfu,=endfor,=endwh,=endtry,=endclass,=endinterface,=endenum,=},=else,=cat,=finall,=END,0\\
execute('setlocal indentkeys+=0=\"\\\ ,0=#\\\ ')
setlocal indentkeys-=0#
setlocal indentkeys-=: