@@ -806,6 +806,11 @@ CTRL-t
806806
807807 Toggles | 'g:go_fmt_autosave' | .
808808
809+ *:GoModFmtAutoSaveToggle*
810+ :GoModFmtAutoSaveToggle
811+
812+ Toggles | 'g:go_mod_fmt_autosave' | .
813+
809814 *:GoAsmFmtAutoSaveToggle*
810815:GoAsmFmtAutoSaveToggle
811816
@@ -880,6 +885,13 @@ CTRL-t
880885 }
881886 }
882887<
888+ *:GoModFmt*
889+ :GoModFmt
890+
891+ Filter the current go.mod buffer through "go mod edit -fmt" command. It
892+ tries to preserve cursor position and avoids replacing the buffer with
893+ stderr output.
894+
883895==============================================================================
884896MAPPINGS *go-mappings*
885897
@@ -1097,6 +1109,10 @@ Calls `:GoImport` for the current package
10971109Generate if err != nil { return ... } automatically which infer the type of
10981110return values and the numbers.
10991111
1112+ *(go-mod-fmt)*
1113+
1114+ Calls | :GoModFmt | for the current buffer
1115+
11001116==============================================================================
11011117TEXT OBJECTS *go-text-objects*
11021118
@@ -1287,7 +1303,15 @@ doesn't break. However it's slows (creates/deletes a file for every save) and
12871303it's causing problems on some Vim versions. By default it's disabled. >
12881304
12891305 let g:go_fmt_experimental = 0
1306+
12901307<
1308+ *'g:go_mod_fmt_autosave'*
1309+
1310+ Use this option to auto | :GoModFmt | on save. By default it's enabled >
1311+
1312+ let g:go_mod_fmt_autosave = 1
1313+ <
1314+
12911315 *'g:go_doc_keywordprg_enabled'*
12921316
12931317Use this option to run `godoc` on words under the cursor with | K | ; this will
@@ -1497,10 +1521,10 @@ that was called. Supported values are "", "quickfix", and "locationlist".
14971521Specifies the type of list to use for command outputs (such as errors from
14981522builds, results from static analysis commands, etc...). When an expected key
14991523is not present in the dictionary, | 'g:go_list_type' | will be used instead.
1500- Supported keys are "GoBuild", "GoErrCheck", "GoFmt", "GoInstall ", "GoLint ",
1501- "GoMetaLinter", "GoMetaLinterAutoSave", "GoModifyTags" (used for both
1502- :GoAddTags and :GoRemoveTags), "GoRename", "GoRun", and "GoTest". Supported
1503- values for each command are "quickfix" and "locationlist".
1524+ Supported keys are "GoBuild", "GoErrCheck", "GoFmt", "GoModFmt ", "GoInstall ",
1525+ "GoLint", " GoMetaLinter", "GoMetaLinterAutoSave", "GoModifyTags" (used for
1526+ both :GoAddTags and :GoRemoveTags), "GoRename", "GoRun", and "GoTest".
1527+ Supported values for each command are "quickfix" and "locationlist".
15041528>
15051529 let g:go_list_type_commands = {}
15061530<
@@ -1874,6 +1898,12 @@ filetype.
18741898The `gohtmltmpl` filetype is automatically set for `* .tmpl` files; the
18751899`gotexttmpl` is never automatically set and needs to be set manually.
18761900
1901+ ==============================================================================
1902+ *gomod* *ft-gomod-syntax*
1903+ go.mod file syntax~
1904+
1905+ The `gomod` 'filetype' provides syntax highlighting for Go's module file `go .mod `
1906+
18771907
18781908==============================================================================
18791909DEBUGGER *go-debug*
0 commit comments