mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-14 22:43:49 -05:00
Add support for gleam, closes #655
Co-authored-by: Jeff Kreeftmeijer <jeffkreeftmeijer@gmail.com>
This commit is contained in:
@@ -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+=#,?,.,/
|
||||
|
||||
32
ftplugin/gleam.vim
Normal file
32
ftplugin/gleam.vim
Normal file
@@ -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
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user