aboutsummaryrefslogtreecommitdiff
path: root/runtime/ftplugin/go.vim
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-07-16 22:28:32 +0200
committerChristian Clason <c.clason@uni-graz.at>2024-07-17 11:11:58 +0200
commit5d8220bda0b668cdaf6d89cdf6fa4ba11e853034 (patch)
tree1fac9d2cf8e1963ef78673f53156be8617d47b69 /runtime/ftplugin/go.vim
parentc146580e9d9fb0d99410665bd42b1edd7405738e (diff)
downloadrneovim-5d8220bda0b668cdaf6d89cdf6fa4ba11e853034.tar.gz
rneovim-5d8220bda0b668cdaf6d89cdf6fa4ba11e853034.tar.bz2
rneovim-5d8220bda0b668cdaf6d89cdf6fa4ba11e853034.zip
vim-patch:3e07d5a: runtime(go): add recommended indent options to ftplugin
related: vim/vim#15264 https://github.com/vim/vim/commit/3e07d5aef19ac34a61b9d58c2e0698351d392f52 Co-authored-by: markmacode <code@mamo.aleeas.com>
Diffstat (limited to 'runtime/ftplugin/go.vim')
-rw-r--r--runtime/ftplugin/go.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/ftplugin/go.vim b/runtime/ftplugin/go.vim
index 61dc1a13b7..75f78cfa4b 100644
--- a/runtime/ftplugin/go.vim
+++ b/runtime/ftplugin/go.vim
@@ -2,6 +2,7 @@
" Language: Go
" Maintainer: David Barnett (https://github.com/google/vim-ft-go)
" Last Change: 2014 Aug 16
+" 2024 Jul 16 by Vim Project (add recommended indent style)
if exists('b:did_ftplugin')
finish
@@ -15,4 +16,9 @@ setlocal commentstring=//\ %s
let b:undo_ftplugin = 'setl fo< com< cms<'
+if get(g:, 'go_recommended_style', 1)
+ setlocal noexpandtab softtabstop=0 shiftwidth=0
+ let b:undo_ftplugin ..= ' | setl et< sts< sw<'
+endif
+
" vim: sw=2 sts=2 et