mirror of
https://github.com/urbit/shrub.git
synced 2024-11-24 04:58:08 +03:00
Improved indent.
This commit is contained in:
parent
55b09bab1d
commit
bb2b616df8
@ -8,6 +8,7 @@ endif
|
||||
let b:did_indent = 1
|
||||
|
||||
|
||||
setlocal indentexpr=HoonIndent(v:lnum)
|
||||
setlocal nolisp
|
||||
setlocal autoindent
|
||||
|
||||
@ -22,10 +23,12 @@ function! HoonIndent(lnum)
|
||||
endif
|
||||
let prevl = substitute(getline(prevlnum),'::.*$','','')
|
||||
|
||||
if prevl =~ '\+\+\s*\w*\s*$'
|
||||
let ind = indent(prevlnum)
|
||||
if prevl =~ '++\s*\w*\s*$'
|
||||
" luslus operator
|
||||
let ind += &sw
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user