Skip to content

Commit

Permalink
Indent: Remove 'in'
Browse files Browse the repository at this point in the history
  • Loading branch information
andys8 committed Feb 10, 2021
1 parent fada016 commit bf1f1bd
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions indent/purescript.vim
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if !exists('g:purescript_indent_dot')
endif

setlocal indentexpr=GetPurescriptIndent()
setlocal indentkeys=!^F,o,O,},=where,=in,=::,=->,=→,==>,=
setlocal indentkeys=!^F,o,O,},=where,=::,=->,=→,==>,=

function! s:GetSynStack(lnum, col)
return map(synstack(a:lnum, a:col), { key, val -> synIDattr(val, "name") })
Expand All @@ -66,21 +66,6 @@ function! GetPurescriptIndent()
return max([s, &l:shiftwidth])
endif

if line =~ '^\s*\<in\>'
let n = v:lnum
let s = 0

while s <= 0 && n > 0
let n = n - 1
let s = match(getline(n), '\<let\>')
if s >= 0 && index(s:GetSynStack(v:lnum - 1, s), 'purescriptString') != -1
let s = -1
endif
endwhile

return s + g:purescript_indent_in
endif

let s = match(prevline, '^\s*\zs\(--\|import\)')
if s >= 0
" comments
Expand Down

0 comments on commit bf1f1bd

Please sign in to comment.