neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

scala.vim (1296B)


      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 " ----------------------------------------------------------------------------
      9 
     10 if exists('b:did_ftplugin') || &cp
     11  finish
     12 endif
     13 let b:did_ftplugin = 1
     14 
     15 " j is fairly new in Vim, so don't complain if it's not there
     16 setlocal formatoptions-=t formatoptions+=croqnl
     17 silent! 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.
     21 if get(g:, 'scala_scaladoc_indent', 0)
     22  setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s2:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,://
     23 else
     24  setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,://
     25 endif
     26 setlocal commentstring=//\ %s
     27 
     28 setlocal shiftwidth=2 softtabstop=2 expandtab
     29 
     30 setlocal include=^\\s*import
     31 setlocal includeexpr=substitute(v:fname,'\\.','/','g')
     32 
     33 setlocal path+=src/main/scala,src/test/scala
     34 setlocal suffixesadd=.scala
     35 
     36 let b:undo_ftplugin = "setlocal cms< com< et< fo< inc< inex< pa< sts< sua< sw<"
     37 
     38 " vim:set sw=2 sts=2 ts=8 et: