From 0450b1ab669afb0869ded1cb892f5ad44ecec029 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 7 Mar 2022 19:12:49 +0100 Subject: ftplugin/go.vim: Add 'formatoptions' for comment leaders --- ftplugin/go.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ftplugin/go.vim b/ftplugin/go.vim index a606635..cdad2d5 100644 --- a/ftplugin/go.vim +++ b/ftplugin/go.vim @@ -25,6 +25,10 @@ nnoremap cdf :!go fmt % setlocal commentstring=//\ %s +" Continue comments on and `o` `O`. +setlocal formatoptions+=or + + " Add a trailing comma when expanding elements to multiple lines let b:argwrap_tail_comma = 1 -- cgit v1.2.3