mirror of
https://github.com/vim/vim.git
synced 2025-08-26 20:03:41 -04:00
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>
This commit is contained in:
parent
031919c7ac
commit
40daa1358c
@ -1,4 +1,4 @@
|
|||||||
*filetype.txt* For Vim version 9.1. Last change: 2025 Apr 15
|
*filetype.txt* For Vim version 9.1. Last change: 2025 Apr 16
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -662,6 +662,16 @@ possibilities: >
|
|||||||
The `:Cycle` command is also mapped to the CTRL-A and CTRL-X keys.
|
The `:Cycle` command is also mapped to the CTRL-A and CTRL-X keys.
|
||||||
For details, see `git-rebase --help`.
|
For details, see `git-rebase --help`.
|
||||||
|
|
||||||
|
GLEAM *ft-gleam-plugin*
|
||||||
|
|
||||||
|
By default the following options are set for the recommended gleam style: >
|
||||||
|
|
||||||
|
setlocal expandtab shiftwidth=2 softtabstop=2
|
||||||
|
|
||||||
|
To disable this behavior, set the following variable in your vimrc: >
|
||||||
|
|
||||||
|
let g:gleam_recommended_style = 0
|
||||||
|
|
||||||
GO *ft-go-plugin*
|
GO *ft-go-plugin*
|
||||||
|
|
||||||
By default the following options are set, based on Golang official docs: >
|
By default the following options are set, based on Golang official docs: >
|
||||||
|
@ -7388,6 +7388,7 @@ ft-fvwm-syntax syntax.txt /*ft-fvwm-syntax*
|
|||||||
ft-gdscript-plugin filetype.txt /*ft-gdscript-plugin*
|
ft-gdscript-plugin filetype.txt /*ft-gdscript-plugin*
|
||||||
ft-gitcommit-plugin filetype.txt /*ft-gitcommit-plugin*
|
ft-gitcommit-plugin filetype.txt /*ft-gitcommit-plugin*
|
||||||
ft-gitrebase-plugin filetype.txt /*ft-gitrebase-plugin*
|
ft-gitrebase-plugin filetype.txt /*ft-gitrebase-plugin*
|
||||||
|
ft-gleam-plugin filetype.txt /*ft-gleam-plugin*
|
||||||
ft-go-plugin filetype.txt /*ft-go-plugin*
|
ft-go-plugin filetype.txt /*ft-go-plugin*
|
||||||
ft-gprof-plugin filetype.txt /*ft-gprof-plugin*
|
ft-gprof-plugin filetype.txt /*ft-gprof-plugin*
|
||||||
ft-groff-syntax syntax.txt /*ft-groff-syntax*
|
ft-groff-syntax syntax.txt /*ft-groff-syntax*
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
" Language: Gleam
|
" Language: Gleam
|
||||||
" Maintainer: Kirill Morozov <kirill@robotix.pro>
|
" Maintainer: Kirill Morozov <kirill@robotix.pro>
|
||||||
" Previous Maintainer: Trilowy (https://github.com/trilowy)
|
" Previous Maintainer: Trilowy (https://github.com/trilowy)
|
||||||
" Last Change: 2025-04-12
|
" Last Change: 2025 Apr 16
|
||||||
|
|
||||||
if exists('b:did_ftplugin')
|
if exists('b:did_ftplugin')
|
||||||
finish
|
finish
|
||||||
@ -11,11 +11,15 @@ let b:did_ftplugin = 1
|
|||||||
|
|
||||||
setlocal comments=://,:///,:////
|
setlocal comments=://,:///,:////
|
||||||
setlocal commentstring=//\ %s
|
setlocal commentstring=//\ %s
|
||||||
setlocal expandtab
|
|
||||||
setlocal formatprg=gleam\ format\ --stdin
|
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 shiftwidth=2
|
||||||
setlocal softtabstop=2
|
setlocal softtabstop=2
|
||||||
|
let b:undo_ftplugin ..= " | setlocal et< sw< sts<"
|
||||||
let b:undo_ftplugin = "setlocal com< cms< fp< et< sw< sts<"
|
endif
|
||||||
|
|
||||||
" vim: sw=2 sts=2 et
|
" vim: sw=2 sts=2 et
|
||||||
|
Loading…
x
Reference in New Issue
Block a user