blob: 769499cfc18d78ebc5ebddfe49c026251df3ac06 [file] [log] [blame]
Bram Moolenaare4a3bcf2016-08-26 19:52:37 +02001" Vim filetype plugin file
2" Language: Scala
3" Maintainer: Derek Wyatt
4" URL: https://github.com/derekwyatt/vim-scala
5" License: Same as Vim
Bram Moolenaar89a9c152021-08-29 21:55:35 +02006" Last Change: 11 August 2021
dkearnsf937ab32023-08-29 05:32:27 +10007" 2023 Aug 28 by Vim Project (undo_ftplugin)
Bram Moolenaare4a3bcf2016-08-26 19:52:37 +02008" ----------------------------------------------------------------------------
9
10if exists('b:did_ftplugin') || &cp
11 finish
12endif
13let b:did_ftplugin = 1
14
15" j is fairly new in Vim, so don't complain if it's not there
16setlocal formatoptions-=t formatoptions+=croqnl
17silent! setlocal formatoptions+=j
18
19" Just like c.vim, but additionally doesn't wrap text onto /** line when
20" formatting. Doesn't bungle bulleted lists when formatting.
21if get(g:, 'scala_scaladoc_indent', 0)
22 setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s2:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,://
23else
24 setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,://
25endif
26setlocal commentstring=//\ %s
27
28setlocal shiftwidth=2 softtabstop=2 expandtab
29
Bram Moolenaar89a9c152021-08-29 21:55:35 +020030setlocal include=^\\s*import
31setlocal includeexpr=substitute(v:fname,'\\.','/','g')
Bram Moolenaare4a3bcf2016-08-26 19:52:37 +020032
33setlocal path+=src/main/scala,src/test/scala
34setlocal suffixesadd=.scala
35
dkearnsf937ab32023-08-29 05:32:27 +100036let b:undo_ftplugin = "setlocal cms< com< et< fo< inc< inex< pa< sts< sua< sw<"
37
Bram Moolenaare4a3bcf2016-08-26 19:52:37 +020038" vim:set sw=2 sts=2 ts=8 et: