Skip to content

Commit

Permalink
Merge pull request #71 from ionide/fix-67
Browse files Browse the repository at this point in the history
Fix #67: don't change indentation after comment lines
  • Loading branch information
cannorin authored Jul 4, 2023
2 parents b7ec680 + 6f044f5 commit 22a70da
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions indent/fsharp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,13 @@ function! GetFsharpIndent()

endif


" Don't change indent after lines begins with '//':
if lline =~ '^\s*//'
let i = indent(v:lnum)
return i == 0 ? ind : i
endif

" Add a 'shiftwidth' after lines ending with:
if lline =~ '\(:\|=\|->\|<-\|(\|\[\|{\|{<\|\[|\|\[<\|\<\(begin\|do\|else\|fun\|function\|functor\|if\|initializer\|object\|private\|sig\|struct\|then\|try\)\|\<object\s*(.*)\)\s*$'
let ind = ind + &sw
Expand Down

0 comments on commit 22a70da

Please sign in to comment.