vim-go v1.13 Release Notes

Release Date: 2017-06-06 // almost 7 years ago
  • ๐Ÿ”‹ FEATURES:

    • ๐Ÿ†• New :GoKeyify command that turns unkeyed struct literals into keyed struct literals. [GH-1258]. i.e:
    Example{"foo", "bar", "qux"}
    

    will be converted to:

    Example{
      foo: "foo",
      bar: "bar",
      qux: "qux",
    }
    

    Checkout the demo here: https://twitter.com/fatih/status/860410299714764802

    • โž• New g:go_addtags_transform setting to change the transform rule (snakecase, camelcase, etc..) for :GoAddTags command [GH-1275]
    • ๐Ÿ†• New snippet shortcut assigned to ife that expands to if err := foo(); err != nil { ... } [GH-1268]

    ๐Ÿ‘Œ IMPROVEMENTS

    • ๐Ÿ‘• :GoMetaLinter can now exclude linters with the new g:go_metalinter_excludes option [GH-1253]
    • 0๏ธโƒฃ Override <C-LeftMouse> mapping so :GoDef is used by default (as we do the same for CTRL-], gd, etc. [GH-1264]
    • add support for go_list_type setting in :GoFmt and :GoImports commands [GH-1304]
    • add support for go_list_type setting in :GoMetaLinter commands [GH-1309]
    • go_fmt_options can be now a dictionary to allow us to specifcy the options for multiple binaries [GH-1308]. i.e:
      let g:go_fmt_options = {
        \ 'gofmt': '-s',
        \ 'goimports': '-local mycompany.com',
        \ }
    
    • If win-vim(x64) with Cygwin is used, cygpath is used for constructing the paths [GH-1092]

    ๐Ÿ› BUG FIXES:

    • ๐Ÿ‘ท job: fix race between channel close and job exit [GH-1247]
    • internal: fix system calls when using tcsh [GH-1276]
    • path: return the unmodified GOPATH if autodetect is disabled [GH-1280]
    • ๐Ÿ›  fix jumping to quickfix window when autom gometalinter on save was enabled [GH-1293]
    • fix highlighting for interface and structs words when go_highlight_types is enabled [GH-1301]
    • ๐Ÿ›  fix cwd for running :GoRun when used with neovim [GH-1296]
    • ๐Ÿ‘ :GoFmt handles files that are symlinked into GOPATH better (note that this behaviour is discouraged, but we're trying our best to handle all edge case :)) [GH-1310]
    • โœ… :GoTest is able to parse error messages that include a colon : [GH-1316]
    • โœ… :GoTestCompile under the hood doesn't produces a test binary anymore. Sometimes a race condition would happen which would not delete the test binary. [GH-1317]
    • ๐Ÿ— :GoDef jumps now to definition for build tags defined with :GoBuildTags (only guru) [GH-1319]

    BACKWARDS INCOMPATIBILITIES:

    • ๐Ÿ‘• :GoLint works on the whole directory instead of the current file. To use it for the current file give it as an argument, i.e :GoLint foo.go [GH-1295]
    • go_snippet_case_type is removed in favor of the new go_addtags_transform setting [GH-1299]
    • go_imports_bin is removed to avoid confusion as it would lead to race conditions when set to gofmt along with the usage of go_fmt_command [GH-1212] [GH-1308]
    • ๐Ÿ”จ commands such as :GoTest has been refactored for easy maintainability. If you use any custom script that was using the function go#cmd#Test, it should be renamed to go#test#Test