summaryrefslogtreecommitdiffstats
path: root/ftplugin/gleam.vim
blob: 00ad4d1f821bf5a308800490ae3ed679928716a9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
if polyglot#init#is_disabled(expand('<sfile>:p'), 'gleam', 'ftplugin/gleam.vim')
  finish
endif


if exists("b:did_ftplugin")
    finish
endif
let b:did_ftplugin = 1

compiler gleam

setlocal commentstring=//%s
setlocal formatoptions-=t formatoptions+=croqnl

setlocal comments=s0:/*!,ex:*/,s1:/*,mb:*,ex:*/,:////,:///,://

" j was only added in 7.3.541, so stop complaints about its nonexistence
silent! setlocal formatoptions+=j

" smartindent will be overridden by indentexpr if filetype indent is on, but
" otherwise it's better than nothing.
setlocal smartindent nocindent

setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab
setlocal textwidth=79

setlocal suffixesadd=.gleam

augroup gleam.vim
autocmd!
augroup END