0
0
mirror of https://github.com/vim/vim.git synced 2025-08-25 19:53:53 -04:00
vim/runtime/ftplugin/gleam.vim
Doug Kearns 40daa1358c
runtime(gleam): Update ftplugin, use recommended_style config variable
Wrap the setting of basic whitespace formatting options in a conditional
block, following the de facto standard.

Setting 'et', 'sts' and 'sw' can be disabled by setting
"gleam_recommended_style" to false.

Follow up to PR #17086.

closes: #17128

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-16 18:29:15 +02:00

26 lines
624 B
VimL

" Vim filetype plugin file
" Language: Gleam
" Maintainer: Kirill Morozov <kirill@robotix.pro>
" Previous Maintainer: Trilowy (https://github.com/trilowy)
" Last Change: 2025 Apr 16
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal comments=://,:///,:////
setlocal commentstring=//\ %s
setlocal formatprg=gleam\ format\ --stdin
let b:undo_ftplugin = "setlocal com< cms< fp<"
if get(g:, "gleam_recommended_style", 1)
setlocal expandtab
setlocal shiftwidth=2
setlocal softtabstop=2
let b:undo_ftplugin ..= " | setlocal et< sw< sts<"
endif
" vim: sw=2 sts=2 et