vim-go v1.20 Release Notes

Release Date: 2019-04-22 // 4 months ago
  • 🔋 FEATURES:

    • 👍 gopls support!
      • use gopls for autocompletion by default in Vim8 and Neovim.
      • use gopls for :GoDef by setting g:go_def_mode='gopls'.
      • use gopls for :GoInfo by setting g:go_info_mode='gopls'.
    • ➕ Add support for golangci-lint.
      • set g:go_metalinter_command='golangci-lint' to use golangci-lint instead of gometalinter.
    • 🆕 New :GoDefType command to jump to a type definition from an instance of the type.

    BACKWARDS INCOMPATABILITIES:

    • g:go_highlight_function_arguments is renamed to g:go_highlight_function_parameters [GH-2117]

    👌 IMPROVEMENTS:

    • Disable g:go_gocode_propose_source by default. [GH-2050]
    • Don't spam users when Vim is run with vi compatibility. [GH-2055]
    • ➕ Add bang support to lint commands to allow them to be run without jumping to errors. [GH-2056]
    • 👉 Use go doc for :GoDoc instead of godoc. [GH-2070]
    • Detach from and shutdown dlv correctly. [GH-2075]
    • Do not require 'autowrite' or 'autowriteall' to be set when using autocompletion in module mode. [GH-2091]
    • 👕 Fix use of g:go_metalinter_command and apply it even when autosaving. [GH-2101]
    • Report errors in quickfix when Delve fails to start (e.g. compiler errors). [GH-2111]
    • 👌 Support 'undo_ftplugin', make most autocmds buffer-local, and only do the bare minimum based on file names alone. [GH-2108]
    • Write a message when :GoInfo can't display any results when g:go_info_mode='gocode'. [GH-2122]
    • Highlight fields followed by an operator when g:go_highlight_fields is set. [GH-1907]
    • Skip autosave actions when the buffer is not a readable file. [GH-2143]
    • ⚙ Run godef from the current buffer's directory to make sure it works with modules. [GH-2150]
    • ➕ Add a function, go#tool#DescribeBalloon, to show information in a balloon with 'balloonexpr'. (Vim8 only). [GH-1975]
    • ➕ Add initial support for gopls. [GH-2163].
    • ➕ Add :GoDefType to jump to the type definition of the identifier under the cursor. [GH-2165]
    • 🔔 Notify gopls about changes. [GH-2171]
    • Respect g:go_jump_to_error when running gometalinter automatically on save. [GH-2176]
    • 0️⃣ Use gopls for code completion by default in Vim8 and Neovim. [GH-2172]
    • ➕ Add support for golangci-lint. [GH-2182]
    • 👉 Show hover balloon using gopls instead of gocode. [GH-2202]
    • Add a new option, g:go_debug_log_output, to control logging with the debugger. [GH-2203]
    • Do not jump to quickfix or location list window when bang is used for async jobs or linting. [GH-2205]
    • 📦 Tab complete package names for commands from vendor directories and in modules. [GH-2213]
    • Add support for gopls to g:go_info_mode. [GH-2224]

    🐛 BUG FIXES:

    • 🛠 Fix opening of non-existent file from :GoDeclsDir when the current directory is not the directory containing the current buffer. [GH-2048]
    • 🛠 Fix jumping to an identifier with godef from a modified buffer. [GH-2054]
    • 🛠 Fix errors when g:go_debug contains debugger-commands. [GH-2075]
    • 🛠 Fix errors from :GoDebugStop in Neovim. [GH-2075]
    • 🛠 Fix :GoSameIdsToggle. [GH-2086]
    • Do not set fileencoding or fileformat options or populate from template when the buffer is not modifiable. [GH-2097]
    • Do not clear buffer-local autocmds of other buffers. [GH-2109]
    • Highlight return parameter types when g:go_highlight_function_arguments is set. [GH-2116]
    • 🛠 Fix lockup in Neovim when trying to run :GoDebugTest when there are no tests. [GH-2125]
    • Keep track of breakpoints correctly when buffer is edited after breakpoints are set. [GH-2126]
    • 🛠 Fix race conditions in :GoDebugStop. [GH-2127]
    • 🛠 Fix jumping to module or package using godef. [GH-2141]
    • 🛠 Fix errors caused by redefining functions within functions. [GH-2189]
    • 🚀 Highlight pre-release and metadata in versions in go.mod. [GH-2192]
    • 🖐 Handle runtime panics from :GoRun when using Neovim's terminal. [GH-2209]
    • 🛠 Fix adding tag option when a tag is added. [GH-2227]

Previous changes from v1.19

  • 🔋 FEATURES:

    • 👍 go.mod file support! This is the first feature for upcoming Go modules support. The followings are added:
      • Syntax highlighting for the go.mod file.
      • A new gomod filetype is set if a go.mod file has been opened and starts with the line module
      • New :GoModFmt command that formats the go.mod file
      • Auto format on save feature for :GoModFmt, enabled automatically. Can be toggled of with the setting g:go_mod_fmt_autosave or with the command: GoModFmtAutoSaveToggle [GH-1931]

    👌 IMPROVEMENTS:

    • 👷 Unify async job handling for Vim8 and Neovim. [GH-1864]
    • Document Vim and Neovim requirements in README.md and help file. [GH-1889]
    • Highlight context.Context when g:go_highlight_extra_types is set. [GH-1903]
    • 👕 Run gometalinter asynchronously in Neovim. [GH-1901]
    • ⚙ Run gorename asynchronously in Vim8 and Neovim. [GH-1894]
    • Install keyify from its canonical import path. [GH-1924]
    • ⚡️ Update the tested version of Neovim to v0.3.1. [GH-1923]
    • ⚙ Run autocompletion asynchronously in Vim8 and Neovim. [GH-1926]
    • Show statusline update when running :GoInfo with g:go_info_mode='gocode'. [GH-1937]
    • ⚡️ Do not update statusline when highlighting sameids or showing type info via an autocmd. [GH-1937]
    • Do not indent within a raw string literal. [GH-1858]
    • Highlight Go's predeclared function identifiers (the functions in builtins) using keyword groups and highlight them using the Identifiers group. [GH-1939]
    • ➕ Add a new FAQ entry to instruct users how to modify the vim-go highlight groups. [GH-1939]
    • 👌 Improve use of statusline and progress messages. [GH-1948]
    • ➕ Add tt snippet to create a table test boilerplate (see https://github.com/golang/go/wiki/TableDrivenTests for more information on how to use a table driven test). [GH-1956]
    • ➕ Add <Plug>(go-decls) and <Plug>(go-decls-dir) mappings. [GH-1964]
    • ✅ Handle go1.11 test output. [GH-1978]
    • Internal: install tools by their custom names [GH-1984]
    • 👌 Support the go-debugger features in Neovim. [GH-2007]
    • color the statusline for termguicolors and Neovim. [GH-2014]
    • ➕ add an option to disable highlighting of breakpoints and the current line when debugging. [GH-2025]
    • ⚡️ Update autocompletion to work with Go modules. [GH-1988]
    • Add an option to search $GOPATH/bin or $GOBIN after $PATH. [GH-2041]

    🐛 BUG FIXES:

    • 🛠 Fix :GoRun % on Windows. [GH-1900]
    • 🛠 Fix go#complete#GetInfo() to return a description of the identifier. [GH-1905]
    • ⏪ Restore support for running tests in the Neovim terminal. [GH-1895]
    • Fix :GoInfo when g:go_info_mode is gocode [GH-1915]
    • 🛠 Fix highlighting of pointer type in var blocks. [GH-1794]
    • 🛠 Fix :GoImport when adding to an empty import block (i.eimport ()) [GH-1938]
    • ⚙ Run shell commands with shellcmdflag set to -c. [GH-2006]
    • 🌲 Use the correct log output option for delve. [GH-1992]
    • 🏁 Pass empty arguments correctly in async jobs on Windows. [GH-2011]
    • Don't close godoc scratch window when using arrow keys. [GH-2021]

    BACKWARDS INCOMPATIBILITIES:

    • ⬆️ Bump minimum required version of Vim to 7.4.2009. [GH-1899]
    • Switch gocode to github.com/mdempsky/gocode. Several gocode options have been removed and a new one has been added. [GH-1853]