summaryrefslogtreecommitdiffstats
path: root/ftplugin/gleam.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2021-01-01 17:09:30 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2021-01-01 17:09:30 +0100
commita81756029291d6e21295687515a3e58499c19b33 (patch)
tree81142fd6640ad9de3b38b7cb0e4bd798a6db86e0 /ftplugin/gleam.vim
parent1f4236df3aaaec797e81572fd120a9d49d4035b9 (diff)
downloadvim-polyglot-a81756029291d6e21295687515a3e58499c19b33.tar.gz
vim-polyglot-a81756029291d6e21295687515a3e58499c19b33.zip
Add support for gleam, closes #655
Co-authored-by: Jeff Kreeftmeijer <jeffkreeftmeijer@gmail.com>
Diffstat (limited to 'ftplugin/gleam.vim')
-rw-r--r--ftplugin/gleam.vim32
1 files changed, 32 insertions, 0 deletions
diff --git a/ftplugin/gleam.vim b/ftplugin/gleam.vim
new file mode 100644
index 00000000..58f39f03
--- /dev/null
+++ b/ftplugin/gleam.vim
@@ -0,0 +1,32 @@
+if has_key(g:polyglot_is_disabled, 'gleam')
+ 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