vim-go v1.14 Release Notes

Release Date: 2017-08-06 // over 6 years ago
  • ๐Ÿ”‹ FEATURES:

    • ๐Ÿ‘ We now have folding support based on Go syntax. To enable it you have to set the following Vim setting: set foldmethod=syntax. Currently it folds blocks ({ }), import, var, and const blocks, and package-level comments. These can be individually disabled/enabled if desired. For more info please read the documentation for the g:go_fold_enable setting. [GH-1339] [GH-1377]
    • :GoFiles accepts now an argument to change the type of files it can show. By default it shows.go source files but now it can be changed to show various kind of files. The full list can be seen via go list --help under the // Source Files section [GH-1372] i.e:
    :GoFiles CgoFiles        // shows .go sources files that import "C"
    :GoFiles TestGoFiles     // shows _test.go files in package
    :GoFiles IgnoredGoFiles  // shows .go sources ignored due to build constraints
    etc..
    

    ๐Ÿ‘Œ IMPROVEMENTS

    • โœ… Files created with _test.go extension have a new template with a ready to go test function. The template can be changed with the g:go_template_test_file setting. [GH-1318]
    • ๐Ÿ‘Œ Improve performance for highly used operations by caching go env calls [GH-1320]
    • โœ… :GoCoverage can accept arguments now. i.e: :GoCoverage -run TestFoo [GH-1326]
    • โš  :GoDecls and :GoDeclsDir shows a warning if ctrlp.vim is not installed
    • ๐Ÿ“ฆ :GoBuild now compiles the package with the -i flag added. This means that subsequent calls are much more faster due caching of packages [GH-1330]
    • :GoCoverage echos now the progress if g:go_echo_command_info is enabled [GH-1333]
    • Add g:go_doc_max_height setting to control the maximum height of the window created by :GoDoc and K mapping [GH-1335]
    • The af text object is able to include the assignment variable for anonymous functions. Can be disabled with g:go_textobj_include_variable = 0 [GH-1345]
    • Add g:go_list_autoclose setting to prevent closing the quickfix/location list after zero items [GH-1361]
    • Cursor is now adjusted and locked to the correct line when goimports is used for autosave [GH-1367]
    • Complement the path of command for different situations of Cygwin environment [GH-1394]
    • ๐Ÿ‘‰ Show message when using :GoDef and opening a new buffer [GH-1385]

    ๐Ÿ› BUG FIXES:

    • ๐Ÿ›  Fix obtaining package's import path for the current directory. This fixes some issues we had if the user was using multiple GOPATH's [GH-1321]
    • ๐Ÿ›  Fix documentation for vim-go & syntastic integration for errcheck using [GH-1323]
    • ๐Ÿ›  Fix showing an output if a test has finished when :GoTest is called [GH-1327]
    • ๐Ÿ›  Fix warning when goimports doesn't support srcdir [GH-1344]
    • Fix broken code folding with go_highlight_types [GH-1338]
    • ๐Ÿ›  Fix blocking the ui when swapfile is enabled and :GoFmt is called (either manually or via autosave) [GH-1362]
    • ๐Ÿ›  Fix getting bin paths for binaries if GOPATH was not set and Go version =>1.7 was used [GH-1363]
    • ๐Ÿ›  Fix picking up the correct list type for showing :GoFmt errors [GH-1365]
    • ๐Ÿ›  Fix auto detecting of GOPATH for import paths with string 'src' (i.e: GOPATH/src/github.com/foo/src/bar) [GH-1366]
    • ๐Ÿ›  Fix showing an empty window if gogetdoc was not found [GH-1379]
    • ๐Ÿ›  Fix commands not being executed if paths would include spaces (binary name, GOPATH, file itself, etc..) [GH-1374]
    • ๐Ÿ›  Fix showing correct message when editing a new file [GH-1371]
    • ๐Ÿ›  Fix filepaths in the quickfix list for :GoVet [GH-1381]
    • ๐Ÿ‘• Run :GoLint against the package of the open file [GH-1382]

    BACKWARDS INCOMPATIBILITIES:

    • :GoFmt now uses quickfix to show formatting errors instead of locationlist. To change back to locationlist you can change it with the setting let g:go_list_type = "locationlist" [GH-1365]
    • ๐Ÿ‘• :GoLint now runs against the package of the open file instead of the current working directory. This is so all commands behave the same relative to the current open buffer. For more info check the comment here [GH-1382]