robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

Felipe MoralesMerge pull request #3270 from ZyX-I/shada-support321db59ca1

master
414 B18 linesraw
1if exists('b:did_ftplugin')
2  finish
3endif
4
5let b:did_ftplugin = 1
6
7function! ShaDaIndent(lnum)
8  if a:lnum == 1 || getline(a:lnum) =~# '\mwith timestamp.*:$'
9    return 0
10  else
11    return shiftwidth()
12  endif
13endfunction
14
15setlocal expandtab tabstop=2 softtabstop=2 shiftwidth=2
16setlocal indentexpr=ShaDaIndent(v:lnum) indentkeys=<:>,o,O
17
18let b:undo_ftplugin = 'setlocal et< ts< sts< sw< indentexpr< indentkeys<'