robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
7945732ed7
master
1" Vim filetype plugin file 2" Language: Scala 3" Maintainer: Derek Wyatt 4" URL: https://github.com/derekwyatt/vim-scala 5" License: Same as Vim 6" Last Change: 11 August 2021 7" 2023 Aug 28 by Vim Project (undo_ftplugin) 8" 2026 Jun 27 by Vim Project (add recommended style guard) 9" ---------------------------------------------------------------------------- 10 11if exists ( 'b:did_ftplugin' ) || & cp 12finish 13endif 14let b: did_ftplugin = 1 15 16" j is fairly new in Vim, so don't complain if it's not there 17setlocal formatoptions -= tformatoptions += croqnl 18silent ! setlocal formatoptions += j 19 20" Just like c.vim, but additionally doesn't wrap text onto /** line when 21" formatting. Doesn't bungle bulleted lists when formatting. 22if get ( g:, 'scala_scaladoc_indent' , 0 ) 23setlocal comments = sO:*\ -,mO:*\ \ ,exO:*/,s2:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,:// 24else 25setlocal comments = sO:*\ -,mO:*\ \ ,exO:*/,s1:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,:// 26endif 27setlocal commentstring = //\ %s 28 29if get ( g:, 'scala_recommended_style' , 30 \get ( g:, 'filetype_recommended_style' , 1 )) 31setlocal shiftwidth = 2 softtabstop = 2 expandtab 32endif 33 34setlocal include = ^\\s*import 35setlocal includeexpr = substitute (v:fname,'\\.','/','g') 36 37setlocal path += src/main/scala,src/test/scala 38setlocal suffixesadd = .scala 39 40let b: undo_ftplugin = "setlocal cms< com< et< fo< inc< inex< pa< sts< sua< sw<" 41 42" vim:set sw=2 sts=2 ts=8 et: