mirror of
https://github.com/neovim/neovim.git
synced 2026-11-01 09:08:22 -06:00
Effective use of 'formatprg' requires both an understanding of the specific capabilities of the formatting tool and Vim's formatting commands. This is overly burdensome for some users. Rather than address each complaint on a filetype by filetype basis, remove 'formatprg' settings from all ftplugins. It is expected that formatter plugins will be available in the near future as a better solution. See vim/vim#17145 (Add "formatter" feature using "compiler" as a template). Note: 'formatprg' will be removed from older ftplugins after the release of Vim 9.2. The setting was added to the go and gleam ftplugins during the current development cycle and have not been included in a Vim release. See: vim/vim#18650 (rust.vim: stop setting formatprg to rustfmt) closes: vim/vim#19108 https://github.com/vim/vim/commit/dcc41752843428142623b527433c551991ea7a31 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
34 lines
908 B
VimL
34 lines
908 B
VimL
" Vim filetype plugin file
|
|
" Language: Gleam
|
|
" Maintainer: Kirill Morozov <kirill@robotix.pro>
|
|
" Previous Maintainer: Trilowy (https://github.com/trilowy)
|
|
" Based On: https://github.com/gleam-lang/gleam.vim
|
|
" Last Change: 2025 Apr 21
|
|
" 2026 Feb 13 by Vim Project (remove 'formatprg' #19108)
|
|
|
|
if exists('b:did_ftplugin')
|
|
finish
|
|
endif
|
|
let b:did_ftplugin = 1
|
|
|
|
setlocal comments=:////,:///,://
|
|
setlocal commentstring=//\ %s
|
|
setlocal suffixesadd=.gleam
|
|
let b:undo_ftplugin = "setlocal com< cms< sua<"
|
|
|
|
if get(g:, "gleam_recommended_style", 1)
|
|
setlocal expandtab
|
|
setlocal shiftwidth=2
|
|
setlocal smartindent
|
|
setlocal softtabstop=2
|
|
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
|