diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2021-01-01 17:09:30 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2021-01-01 17:09:30 +0100 |
commit | a81756029291d6e21295687515a3e58499c19b33 (patch) | |
tree | 81142fd6640ad9de3b38b7cb0e4bd798a6db86e0 /ftplugin | |
parent | 1f4236df3aaaec797e81572fd120a9d49d4035b9 (diff) | |
download | vim-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')
-rw-r--r-- | ftplugin/dune.vim | 10 | ||||
-rw-r--r-- | ftplugin/gleam.vim | 32 | ||||
-rw-r--r-- | ftplugin/ocaml.vim | 2 | ||||
-rw-r--r-- | ftplugin/sexplib.vim | 3 |
4 files changed, 45 insertions, 2 deletions
diff --git a/ftplugin/dune.vim b/ftplugin/dune.vim index 970c9825..92c471f4 100644 --- a/ftplugin/dune.vim +++ b/ftplugin/dune.vim @@ -2,6 +2,14 @@ if has_key(g:polyglot_is_disabled, 'ocaml') finish endif +" Language: Dune buildsystem +" Maintainer: Markus Mottl <markus.mottl@gmail.com> +" Anton Kochkov <anton.kochkov@gmail.com> +" URL: https://github.com/ocaml/vim-ocaml +" Last Change: +" 2018 Nov 3 - Added commentstring (Markus Mottl) +" 2017 Sep 6 - Initial version (Etienne Millon) + if exists("b:did_ftplugin") finish endif @@ -12,3 +20,5 @@ set lisp " Comment string setl commentstring=;\ %s setl comments=:; + +setl iskeyword+=#,?,.,/ 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 diff --git a/ftplugin/ocaml.vim b/ftplugin/ocaml.vim index 183b5318..84be233e 100644 --- a/ftplugin/ocaml.vim +++ b/ftplugin/ocaml.vim @@ -9,7 +9,7 @@ endif " Pierre Vittet <pierre-vittet@pvittet.com> " Stefano Zacchiroli <zack@bononia.it> " Vincent Aravantinos <firstname.name@imag.fr> -" URL: http://www.ocaml.info/vim/ftplugin/ocaml.vim +" URL: https://github.com/ocaml/vim-ocaml " Last Change: " 2013 Oct 27 - Added commentstring (MM) " 2013 Jul 26 - load default compiler settings (MM) diff --git a/ftplugin/sexplib.vim b/ftplugin/sexplib.vim index ebd322ad..7b36d631 100644 --- a/ftplugin/sexplib.vim +++ b/ftplugin/sexplib.vim @@ -2,9 +2,10 @@ if has_key(g:polyglot_is_disabled, 'ocaml') finish endif +" Vim filetype plugin file " Language: Sexplib " Maintainer: Markus Mottl <markus.mottl@gmail.com> -" URL: http://www.ocaml.info/vim/ftplugin/sexplib.vim +" URL: https://github.com/ocaml/vim-ocaml " Last Change: " 2017 Apr 12 - First version (MM) |