runtime(gleam): update filetype plugin, include new compiler and syntax script
closes: #17172
Signed-off-by: Kirill Morozov <mail2kirill@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/ftplugin/gleam.vim b/runtime/ftplugin/gleam.vim
index 70958c7..3ea68fa 100644
--- a/runtime/ftplugin/gleam.vim
+++ b/runtime/ftplugin/gleam.vim
@@ -2,24 +2,32 @@
" Language: Gleam
" Maintainer: Kirill Morozov <kirill@robotix.pro>
" Previous Maintainer: Trilowy (https://github.com/trilowy)
-" Last Change: 2025 Apr 16
+" Based On: https://github.com/gleam-lang/gleam.vim
+" Last Change: 2025 Apr 21
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
-setlocal comments=://,:///,:////
+setlocal comments=:////,:///,://
setlocal commentstring=//\ %s
setlocal formatprg=gleam\ format\ --stdin
-
-let b:undo_ftplugin = "setlocal com< cms< fp<"
+setlocal suffixesadd=.gleam
+let b:undo_ftplugin = "setlocal com< cms< fp< sua<"
if get(g:, "gleam_recommended_style", 1)
setlocal expandtab
setlocal shiftwidth=2
+ setlocal smartindent
setlocal softtabstop=2
- let b:undo_ftplugin ..= " | setlocal et< sw< sts<"
+ setlocal tabstop=2
+ let b:undo_ftplugin ..= " | setlocal et< sw< si< sts< ts<"
+endif
+
+if !exists('current_compiler')
+ compiler gleam_build
+ let b:undo_ftplugin ..= "| compiler make"
endif
" vim: sw=2 sts=2 et