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 toif 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 forCTRL-]
,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
andstructs
words whengo_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 newgo_addtags_transform
setting [GH-1299]go_imports_bin
is removed to avoid confusion as it would lead to race conditions when set togofmt
along with the usage ofgo_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 functiongo#cmd#Test
, it should be renamed togo#test#Test
- ๐ New