Skip to content

Commit dcc4175

Browse files
dkearnschrisbra
authored andcommitted
runtime(go,gleam): Remove 'formatprg' from ftplugins
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 #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: #18650 (rust.vim: stop setting formatprg to rustfmt) closes: #19108 Signed-off-by: Doug Kearns <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent a39d7c2 commit dcc4175

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

runtime/ftplugin/gleam.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
" Previous Maintainer: Trilowy (https://github.com/trilowy)
55
" Based On: https://github.com/gleam-lang/gleam.vim
66
" Last Change: 2025 Apr 21
7+
" 2026 Feb 13 by Vim Project (remove 'formatprg' #19108)
78

89
if exists('b:did_ftplugin')
910
finish
@@ -12,9 +13,8 @@ let b:did_ftplugin = 1
1213

1314
setlocal comments=:////,:///,://
1415
setlocal commentstring=//\ %s
15-
setlocal formatprg=gleam\ format\ --stdin
1616
setlocal suffixesadd=.gleam
17-
let b:undo_ftplugin = "setlocal com< cms< fp< sua<"
17+
let b:undo_ftplugin = "setlocal com< cms< sua<"
1818

1919
if get(g:, "gleam_recommended_style", 1)
2020
setlocal expandtab

runtime/ftplugin/go.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
" 2025 Apr 16 by Vim Project (set 'cpoptions' for line continuation, #17121)
99
" 2025 Jul 02 by Vim Project (add section movement mappings #17641)
1010
" 2025 Jul 05 by Vim Project (update b:undo_ftplugin #17664)
11+
" 2026 Feb 13 by Vim Project (remove formatprg #19108)
1112

1213
if exists('b:did_ftplugin')
1314
finish
@@ -18,15 +19,14 @@ let s:cpo_save = &cpo
1819
set cpo&vim
1920

2021
setlocal formatoptions-=t
21-
setlocal formatprg=gofmt
2222

2323
setlocal comments=s1:/*,mb:*,ex:*/,://
2424
setlocal commentstring=//\ %s
2525
setlocal keywordprg=:GoKeywordPrg
2626

2727
command! -buffer -nargs=* GoKeywordPrg call s:GoKeywordPrg()
2828

29-
let b:undo_ftplugin = 'setl fo< com< cms< fp< kp<'
29+
let b:undo_ftplugin = 'setl fo< com< cms< kp<'
3030
\ . '| delcommand -buffer GoKeywordPrg'
3131

3232
if get(g:, 'go_recommended_style', 1)

0 commit comments

Comments
 (0)