127 KiB
unplanned
BACKWARDS INCOMPATIBILITIES:
IMPROVEMENTS:
- Update documentation for installing tools. [GH-3413]
- Show diagnostics via go#tool#DescribeBalloon(). [GH-3415] [GH-3417]
- Allow version of individual tools to be installed with
:GoUpdateBinariesand:GoInstallBinariesto be overridden by users. [GH-3435] [GH-3436] - Highlight numeric formats introduced in Go 1.13. [GH-3440]
BUG FIXES:
- Fix quoting of arguments when shell is set to pwsh on Windows. [GH-3422]
- Use -mod=mod instead of -mod=readonly when installing tools. [GH-3449]
v1.26 - (April 23, 2022)
BACKWARDS INCOMPATIBILITIES:
IMPROVEMENTS:
- Add mapping for formatting,
(go-fmt). [GH-3209] - Add
trsnippet for"testing.T".Run. [GH-3210] [GH-3220] - Use
go env GOBINto determineGOBIN's value. [GH-3207] - List register in the debugger. [GH-3221]
- Install the latest release of tools that seem to be using tags to do releases instead of installing from their master/main branch. [GH-3227]
- Expose error message when
goplscannot be found andg:go_echo_command_infois set. [GH-3244] - Install all tools in module aware mode in preparation for Go 1.17 release. [GH-3226]
- Add
g:go_doc_balloonto allow godoc to be displayed in hover balloons. [GH-3252] - Default to using
revivein place ofgolint. [GH-3248] [GH-3401] - Teach
:GoDebugPrintto show function call return values. [GH-3256] - Do not enable keyify unless in GOPATH. [GH-3095]
- Show LSP messages to users. [GH-3058]
- Check omnifunc's value before executing actions on CompletedDone event. [GH-3274]
- Highlight new form of build constraints. [GH-3292]
- Teach
:GoDiagnosticsto handle package pattern arguments. [GH-3297] - Add
g:go_debug_subsitute_pathsto support debugging applications when the source is hosted in a local location that is different from where the binary was compiled. [GH-3301] - Wrap text in the fzf preview window by default. [GH-3310]
- Wait for up to five seconds when opening a connection to a remote debugger. [GH-3312]
- Install tools with
go installinstead ofgo get. [GH-3317] [GH-3370] - Update
:GoPlayto usego.dev/playinstead ofplay.golang.org. [GH-3331] [GH-3348] - Recurse local variables more deeply when debugging. [GH-3344]
- Add syntax elements for
anyandcomparabletypes. [GH-3351] - Add syntax support for go.work files. [GH-3375]
- Show the current goroutine at the top of the list of goroutines when debugging. [GH-3379]
- Add
:GoModReloadand autocmd events to reload go.mod when it changes on disk and is open in a buffer. [GH-3387] [GH-3391] - Add syntax support for generics. [GH-3397]
- Remove invalid numeric literal highlighting. [GH-3404]
BUG FIXES:
- Handle terminating parenthesis on hexadecimal values. [GH-3216]
- Fix applying text edits from gopls. [GH-3231]
- Apply arguments to
:GoCoverageBrowser. [GH-3240] - Fix
:GoFillStructwheng:go_fillstruct_modeisgopls. [GH-3279] - Fix example in
g:go_metalinter_enableddocumentation. [GH-3291] - Fix changing directories in older Vims. [GH-3299]
- Highlight the receive type when method declarations that omit the receiver identifier. [GH-3306]
- Do not highlight misspellings in import paths. [GH-3308] [GH-3321]
- Handle shell quoting when execing. [GH-3323]
- Do not automatically add directories from the module cache into the LSP workspace. [GH-3343]
- Resolve symlinks in autocmd events. [GH-3353]
- Fix
:GoRenamein Neovim so that it does not take 10 seconds to complete. [GH-3386] - Fix
:GoDebugConnectargument handling. [GH-3400]
v1.25 - (April 18, 2021)
BACKWARDS INCOMPATIBILITIES:
- Remove g:go_autodetect_gopath. [GH-3078]
IMPROVEMENTS:
- Clarify allowed values for
goplsrelated configuration options. [GH-3016] [GH-3017] - Add
g:go_fillstruct_modeto allow:GoFillStructto be satisfied by eitherfillstructor bygopls. [GH-3018] - Add
:GoDebugTestFuncto debug the test function surrounding the current cursor location. [GH-3011] - Implicitly add a workspace when a file from a module is opened. [GH-3028]
- Add support for using static check as the gometalinter. [GH-3036] [GH-3133]
- Add
g:go_debug_mappingsto allow the debug key mappings to be customized. [GH-3035] [GH-3143] - Use
goplsas the default instead ofguruto satisfy:GoImplements. [GH-3034] - Deprecate g:go_diagnostics_enabled
and addg:go_diagnostics_level` to allow more finely grained control of the handling of diagnostics messages. [GH-3050] [GH-3052] [GH-3119] - Add support for allowing
g:go_gopls_localto specify different local imports values per workspace. [GH-3053] - Improve
:GoDeclsand:GoDeclsDirdisplay. [GH-3081] - Preserve existing window layout when debugging and
g:go_debug_windowsis empty. [GH-3068] - Show identifier in fzf's preview window with
:GoDeclsand:GoDeclsDir. [GH-3083] - Use
goplsfor:GoCallers. [GH-3088] [GH-3090] [GH-3141] [GH-3142] - Update denite integration to work with python3.9. [GH-3097]
- Add syntax highlighting for go.sum files. [GH-3102]
- Change the default from metalinter to staticcheck. [GH-3126]
- Add
g:go_debug_preserve_layoutto prevent:GoDebugand friends from closing windows. [GH-3125] - Add support for
fillstruct's new-tagsflag. [GH-3156] - Display map key and slice elements more usefully in the local vars window in debug mode. [GH-3170]
- Add support for go.mod's
retractdirective. [GH-3166] - Do not execute disabled code actions. [GH-3155]
- Add
:GoDebugConnectto support connecting to an instance of delve started outside of vim-go. [GH-3179] - Use gopls to adjust imports and formatting by default. [GH-2986]
- Set the filetype for .tmpl files to gohtmltmpl even if it's already been set. [GH-3146]
BUG FIXES:
- Remove implications that terminal mode is only applied for Neovim. [GH-3010]
- Correct documentation to clearly show the default value for
g:go_gopls_options. [GH-3019] - Allow truthy values for
g:go_gopls_gofumpt. [GH-3017] [GH-3022] - Fix quickfix title for
:GoMetaLinter. [GH-3040] - Change key mapping for (go-debug-halt) to F8 to resolve collision with key mapping for (go-debug-print). [GH-3047]
- Handle gopls v0.5.2 addition of a prefix on the expected code actions names. [GH-3077]
- Make sure all buffers' mappings are restored when debugging stops. [GH-3048]
- Return early when
g:go_referrers_modesisgoplsandgoplsis disabled. [GH-3090] - Handle yet another error format produced by golangci-lint. [GH-3094]
- Handle additional ways that gopls can provide links for godoc. [GH-3112]
- Remove implication that
g:go_def_reuse_bufferonly applies to split variant of jumping to a definition. [GH-3128] - Organize imports correctly when
goplsformatting usesgofumpt. [GH-3154] - Rename all instances of an identifier when
g:go_rename_modeisgopls. [GH-3181] [GH-3182] - Terminate a case statement in the select snippet with a colon. [GH-3185]
- Fix syntax highlighting in template files. [GH-3188] [GH-3189]
v1.24 - (September 15, 2020)
IMPROVEMENTS:
- Clarify how
g:go_imports_autosaveandg:go_fmt_autosaveinteract. [GH-2893] - Document what the working directory will be for
:GoRun. [GH-2898] - Add Ultisnip snippet for wrapping errors. [GH-2883]
- Beautify the godoc pop up window border. [GH-2900]
- Default
g:go_doc_urlto https://pkg.go.dev. [GH-2884] - Default
g:go_gopls_optionsto[-remote=auto]to share gopls instances with other plugins and multiple instances of Vim. [GH-2905] - Use the module root as the working directory when renaming so that all
references to the symbol will be renamed when in module aware mode and
g:go_rename_commandis set togopls. [GH-2917] - Change
g:go_rename_command's default togopls. [GH-2922] - Do not send unnecessary textDocument/didChange notifications to
gopls. [GH-2902] [GH-2930] - Stop the debugger when the process being debugged exits. [GH-2921]
- Use the module package cache as a source of packages candidates when trying to complete package names. [GH-2936] [GH-2939]
- Allow interaction with Vim while waiting for a breakpoint to be hit while debugging. [GH-2932]
- Refactor Vim signs used for debugging breakpoints to avoid id collision with other plugins. [GH-2943]
- Refactor debugger's rpc response handling to be asynchronous so that Vim will be responsive while the program being debugged is executing. [GH-2948] [GH-2952]
- Warn when the debugger breaks in a file that has changed since debugging started. [GH-2950]
- Enable
go-runmappings that use the terminal to work with Vim in addition to Neovim. [GH-2956] - Use existing diagnostics for the file when the file hasn't changed and
g:go_metalinter_commandisgopls. [GH-2960] - Add a new option,
g:go_code_completion_icase, to allow ignoring case when filtering completion results. [GH-2961] - Make sure tools are not cross-compiled with
:GoInstallBinariesand:GoUpdateBinaries. [GH-2982] [GH-2988] - Add
:GoDebugHaltto allow a program being debugged to be paused before it hits a breakpoint. [GH-2983] - Clear highlighting of the current line when after resuming when debugging. [GH-2984]
- Add
:GoDebugAttachto debug a running process. [GH-2989] - Add
g:go_term_reuseoption to allow the reuse of a terminal window. [GH-2990] - Add official support for using
gopls'gofumptworkspace setting viag:go_gopls_gofumpt. [GH-2994] [GH-3005] - Add support for using
gopls' workspace settings that are otherwise not yet officially supported by vim-go. [GH-2994]
BUG FIXES:
- Fix call to non-existent function in terminal mode edge case. [GH-2895]
- Do not show errors when adding a text property for highlighting fails. [GH-2892]
- Include
errchecking:go_metalinter_enabled's default. [GH-2903] - Fix display of completion selection information on command-line when
g:go_echo_go_infois enabled. [GH-2907] - Prevent
:GoDebugBreakpointfrom causing delve to exit. [GH-2908] - Use the resolved directory name for
gopls' working directory whengo.modis in a symlinked path. [GH-2913] - Fix buffer reuse with
:GoDef. [GH-2928] - Handle breakpoints that are already set before calling
:GoDebugStartor:GoDebugTestin some locales that cause thesign placeoutput to vary. [GH-2921] - Handle diagnostic errors at the end of a .go file. [GH-2942]
- Fix the
go-implementsmapping to use respectg:go_implements_mode. [GH-2944] - Handle null results from
goplswhen getting definitions or type definitions from virtual files. [GH-2951] - Fix warning when Neovim is older than v0.4.0. [GH-2959]
- Correct documentation that referred to
g:go_imports_commandto refer tog:go_imports_modeinstead. [GH-2969] - Remove reference to gocode in error message when
g:go_info_modeis set to an unsupported value. [GH-2978] - Make sure debugging commands are configured when debugging a second time within a single Vim session. [GH-2985]
- Correct documentation in for
:GoModifyTagswhen adding a specific tag value. [GH-3001] - Fix the path given to
goplswhenlet g:go_metalinter='gopls'and:GoMetaLinteris called without any arguments. [GH-2992] - Do not override a user's configuration for
GoDebugBreakpointorGoDebugCurrenthighlight groups. [GH-2998] - Apply
goplstext edits correctly that insert solitary newlines. [GH-3000]
v1.23 - (May 16, 2020)
BACKWARDS INCOMPATIBILITIES:
IMPROVEMENTS:
- Make signs for breakpoints configurable. [GH-2676] [GH-2690]
- Enable g:go_gopls_complete_unimported by default to stay aligned with gopls' defaults. [GH-2695]
- Document mappings that were recently added. [GH-2699]
- Handle null arrays better in gopls responses. [GH-2703]
- Use
goplsdefaults by default when they're not otherwise specified in vim-go options. [GH-2696] - Add support for
gomodifytags --skip-unexported[GH-2660] - Show problems that prevent golangci-lint from running linters. [GH-2706] [GH-2720]
- Support golangci-lint config file by not using
--disable-allwheng:go_metalinter_enableorg:go_metalinter_autosave_enabledis set to an empty array. [GH-2655] [GH-2715] - Add support for Vim8 terminals. [GH-2639] [GH-2736]
- Replace
g:go_gopls_fuzzy_matchingwithg:go_gopls_matcherin response togoplsdeprecation of itsfuzzyMatchingoption. [GH-2728] - Set statuses and progress messages consistently for code quality tools. [GH-2727]
- Add a new supported value to
g:go_fmt_commandto format withgopls. [GH-2729] [GH-2752] [GH-2852] - Handle changes to
go test -voutput. [GH-2743] - Add
g:go_gopls_mod_tempfileto configuregopls'tempModfileconfiguration. [GH-2747] - Add
g:go_gopls_optionsto configuregopls' commandline options. [GH-2747] - Improve readability of gopls logs. [GH-2773]
- Introduce
g:go_implements_modeto allow:GoImplementsto be satisfied withgopls. [GH-2741] [GH-2799] - Introduce
g:go_imports_modeto allow:GoImportsto be satisfied withgopls. [GH-2791] [GH-2794] [GH-2796] [GH-2848] - Send LSP synchronization messages to
goplswhen the file does not yet exist on disk as long as its directory exists. [GH-2805] - Run
gogetdocin the buffer's directory so that it will work regardless of the user's working directory in module-aware mode. [GH-2804] - Add
g:go_gopls_analysesto supportgopls' analyses options. [GH-2820] - Add
g:go_gopls_localto supportgopls' local option to control how third party imports are organized. [GH-2821] - Use gopls to get documentation and documentation links for identifiers under the cursor. [GH-2822] [GH-2839]
- Clarify documentation for terminal options. [GH-2843]
BUG FIXES:
- Use the discovered full path for gopls when renaming. [GH-2692]
- Execute commands correctly on windows when
'shell'is not cmd.exe [GH-2713] [GH-2724] - Always execute
errcheckin the current package's directory. [GH-2726] - Fix errors when highlighting diagnostics after a
:GoImports. [GH-2746] - Preserve errors from formatting when both formatting and metalinting happen on save. [GH-2733] [GH-2810]
- Preserve ordering of gopls messages in the log. [GH-2753]
- Fix
:GoDefon windows wheng:go_def_modeis set togopls. [GH-2768] - Handle null values from
gopls. [GH-2778] - Preserve diagnostics highlights after formatting. [GH-2779]
- Fix the decoding and encoding of multi-byte file paths received from and sent
to
gopls. [GH-2784] - Fix
:GoRunso that it works as expected when the current working directory is neither in GOPATH nor within a module. [GH-2782] [GH-2818] [GH-2842] - Use absolute file paths for
:GoRun's arguments in terminal mode. [GH-2844] - Show the command executed by
:GoRunwheng:go_debugincludes'shell-commands'. [GH-2785] [GH-2817] - Clear the list for formatting errors when
g:go_fmt_commandisgopls. [GH-2790] - Handle text edits from gopls that are only line insertions. [GH-2802] [GH-2803]
- Add
g:go_imports_autosaveso that imports can be adjusted on save wheng:go_imports_modeis set togopls. [GH-2800] [GH-2858] - Correct vim-go's help to correctly identify
g:go_referrer_mode's default. [GH-2832] - Clear the quickfix list when
:GoLintsucceeds. [GH-2833] - Respect arguments to
:GoDocBrowser. [GH-2822] - Use the correct path to documentation for struct fields with
:GoDocBrowser. [GH-2822] - Do not try parsing errors from terminal jobs when the working directory has been removed. [GH-2824]
- Document that
g:go_jump_to_errorapples to running the metalinter on save, too. [GH-2854] - Ignore commented out import statements when executing
:GoImport. [GH-2862] - Interpret file paths in
go veterrors relative to the current buffer's directory. [GH-2882]
v1.22 - (January 30, 2020)
BACKWARDS INCOMPATIBILITIES:
- Drop support for Vim 7.4. The minimum required version of Vim is now 8.0.1453. [GH-2495] [GH-2497]
- Drop support for
gometalinter[GH-2494]
IMPROVEMENTS:
- Highlight the
gokeyword in go.mod files. [GH-2473] - Use echo functions consistently. [GH-2458]
- Add support for managing goroutines in debugger. [GH-2463] [GH-2527]
- Document
g:go_doc_popup_window. [GH-2506] - Make
g:go_doc_popup_window=1work for Neovim, too. [GH-2451] [GH-2512] - Handle errors jumping to a definition in a file open in another Vim process better. [GH-2518]
- Improve the UX when the gopls binary is missing. [GH-2522]
- Use gopls instead of guru for
:GoSameIds. [GH-2519] - Use gopls instead of guru for
:GoReferrers. [GH-2535] - Update documentation for
g:go_addtags_transform. [GH-2541] - Install most helper tools in module aware mode. [GH-2545]
- Add a new option,
g:go_referrers_modeto allow the user to choose whether to use gopls or guru for finding references. [GH-2566] - Add options to control how gopls responds to completion requests. [GH-2567] [GH-2568]
- Add syntax highlighting for binary literals. [GH-2557]
- Improve highlighting of invalid numeric literals. [GH-2571] [GH-2587] [GH-2589] [GH-2584] [GH-2597] [GH-2599]
- Add highlighting of sections reported by gopls diagnostics' errors and warnings. [GH-2569] [GH-2643]
- Make the highlighting of fzf decls configurable. [GH-2572] [GH-2579]
- Support renaming with gopls. [GH-2577] [GH-2618]
- Add an option,
g:go_gopls_enabled, to allow gopls integration to be disabled. [GH-2605] [GH-2609] [GH-2638] [GH-2640] - Add a buffer level option,
b:go_fmt_options, to control formatting options per buffer. [GH-2613] - Use build tags when running
:GoVet. [GH-2615] - Add new snippets for UltiSnips. [GH-2623] [GH-2627]
- Expand completions as snippets when
g:go_gopls_use_placeholdersis set. [GH-2624] - Add a new function,
:GoDiagnosticsand an associated mapping for seeinggoplsdiagnostics. Because of the performance implications on large projects,g:go_diagnostics_enabledcontrols whether all diagnostics are processed or only the diagnostics for the current buffer. [GH-2612] - Explain how to find and detect multiple copies of vim-go in the FAQ. [GH-2632]
- Update the issue template to ask for the gopls version and
:GoReportGitHubIssueto provide it. [GH-2630] - Use text properties when possible for some highlighting cases. [GH-2652] [GH-2662] [GH-2663] [GH-2672] [GH-2678]
BUG FIXES:
- Fix removal of missing directories from gopls workspaces. [GH-2507]
- Change to original window before trying to change directories when term job ends. [GH-2508]
- Swallow errors when the hover info cannot be determined. [GH-2515]
- Fix errors when trying to debug lsp and hover. [GH-2516]
- Reset environment variables on Vim <= 8.0.1831 . [GH-2523]
- Handle empty results from delve. [GH-2526]
- Do not overwrite
updatetimewheng:go_auto_sameidsorg:go_auto_type_infois set. [GH-2529] - Fix example for
g:go_debug_log_outputin docs. [GH-2547] - Use FileChangedShellPost instead of FileChangedShell so that reload messages are not hidden. [GH-2549]
- Restore cwd after
:GoTestwheng:go_term_enabledis set. [GH-2556] - Expand struct variable correctly in the variables debug window. [GH-2574]
- Show output from errcheck when there are failures other than problems it can report. [GH-2667]
v1.21 - (September 11, 2019)
BACKWARDS INCOMPATIBILITIES:
g:go_metalinter_disabledhas been removed. [GH-2375]
IMPROVEMENTS:
- Add a new option,
g:go_code_completion_enabled, to control whether omnifunc is set. [GH-2229] - Use build tags with golangci-lint. [GH-2261]
- Allow debugging of packages outside of GOPATH without a go.mod file. [GH-2269]
- Show which example failed when Example tests fail [GH-2277]
- Show function signature and return types in preview window when autocompleting functions and methods. [GH-2289]
- Improve the user experience when using null modules. [GH-2300]
- Modify
:GoReportGitHubIssueto include vim-go configuration values [GH-2323] - Respect
g:go_info_mode='gopls'in go#complete#GetInfo. [GH-2313] - Allow
:GoLint,:GoErrCheck, and:GoDebugto work in null modules. [GH-2335] - Change default value for
g:go_info_modeandg:go_def_modeto'gopls'. [GH-2329] - Add a new option,
g:go_doc_popup_windowto optionally use a popup window for godoc in Vim 8.1.1513 and later. [GH-2347] - Add
:GoAddWorkspacefunction to support multiple workspaces with gopls. [GH-2356] - Install gopls from its stable package. [GH-2360]
- Disambiguate progress message when initializing gopls. [GH-2369]
- Calculate LSP position correctly when on a line that contains multi-byte characters before the position. [GH-2389]
- Calculate Vim position correctly from LSP text position. [GH-2395]
- Use the statusline to display gopls initialization status messages and only
echo the statuses when
g:go_echo_command_infois set. [GH-2422] - Send configuration to gopls so that build tags will be considered and hover content won't have documentation. [GH-2429]
- Add a new option,
g:go_term_close_on_exit, to control whether jobs run in a terminal window will close the terminal window when the job exits. [GH-2409] - Allow
g:go_template_fileandg:go_template_test_filesto reside outside of vim-go's template directory. [GH-2434] - Add a new command,
:GoLSPDebugBrowser, to open a browser to gopls debugging view. [GH-2436] - Restart gopls automatically when it is updated via
:GoUpdateBinaries. [GH-2453] - Reset
'more'while installing binaries to avoid unnecessary more prompts. [GH-2457] - Highlight
%was a format specifier (for Go 1.13). [GH-2433] - Handle changes to Go 1.13's go vet output that gometalinter isn't expecting. [GH-2475]
- Make
golangci-lintthe default value forg:go_metalinter_command. [GH-2478] - Parse compiler errors from Go 1.13
go vetcorrectly. [GH-2485]
BUG FIXES:
- display info about function and function types whose parameters are
interface{}without truncating the function signature. [GH-2244] - install tools that require GOPATH mode when in module mode. [GH-2253]
- Detect GOPATH when starting
gopls[GH-2255] - Handle
goplsresponses in the same window from which the respective request originated. [GH-2266] - Show completion matches from gocode. [GH-2267]
- Show the completion preview window. [GH-2268]
- Set the anchor for method documentation correctly. [GH-2276]
- Respect the LSP information for determining where candidate matches start. [GH-2291]
- Restore environment variables with backslashes correctly. [GH-2292]
- Modify handling of gopls output for
:GoInfoto ensure the value will be displayed. [GH-2311] - Run
:GoLintsuccessfully in null modules. [GH-2318] - Ensure actions on save work in new buffers that have not yet been persisted to disk. [GH-2319]
- Restore population of information in
:GoReportGitHubIssue. [GH-2312] - Do not jump back to the originating window when jumping to definitions with
g:go_def_mode='gopls'. [GH-2327] - Fix getting information about a valid identifier for which gopls returns no
information (e.g. calling
:GoInfoon a package identifier). [GH-2339] - Fix tab completion of package names on the cmdline in null modules. [GH-2342]
- Display identifier info correctly when the identifier has no godoc. [GH-2373]
- Fix false positives when saving a buffer and
g:go_metalinter_commandisgolangci-lint. [GH-2367] - Fix
:GoDebugRestart. [GH-2390] - Do not execute tests twice in terminal mode. [GH-2397]
- Do not open a new buffer in Neovim when there are compilation errors and terminal mode is enabled. [GH-2401]
- Fix error due to typo in implementation of
:GoAddWorkspace. [GH-2415] - Do not format the file automatically when
g:go_format_autosaveis set and the file being written is not the current file. [GH-2442] - Fix
go-debug-stepoutmapping. [GH-2464] - Handle paths with spaces correctly when executing jobs. [GH-2472]
- Remove a space in the default value for
g:go_debug_log_output, so that Delve will start on Windows. [GH-2480]
1.20 - (April 22, 2019)
FEATURES:
- gopls support!
- use gopls for autocompletion by default in Vim8 and Neovim.
- use gopls for
:GoDefby settingg:go_def_mode='gopls'. - use gopls for
:GoInfoby settingg:go_info_mode='gopls'.
- Add support for golangci-lint.
- set
g:go_metalinter_command='golangci-lint'to use golangci-lint instead of gometalinter.
- set
- New
:GoDefTypecommand to jump to a type definition from an instance of the type.
BACKWARDS INCOMPATIBILITIES:
g:go_highlight_function_argumentsis renamed tog:go_highlight_function_parameters[GH-2117]
IMPROVEMENTS:
- Disable
g:go_gocode_propose_sourceby 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 docfor:GoDocinstead ofgodoc. [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_commandand 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
:GoInfocan't display any results wheng:go_info_mode='gocode'. [GH-2122] - Highlight fields followed by an operator when
g:go_highlight_fieldsis set. [GH-1907] - Skip autosave actions when the buffer is not a readable file. [GH-2143]
- Run
godeffrom 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
:GoDefTypeto jump to the type definition of the identifier under the cursor. [GH-2165] - Notify gopls about changes. [GH-2171]
- Respect
g:go_jump_to_errorwhen runninggometalinterautomatically on save. [GH-2176] - 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
goplstog:go_info_mode. [GH-2224]
BUG FIXES:
- Fix opening of non-existent file from
:GoDeclsDirwhen 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_debugcontainsdebugger-commands. [GH-2075] - Fix errors from
:GoDebugStopin 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
:GoDebugTestwhen 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
:GoRunwhen using Neovim's terminal. [GH-2209] - Fix adding tag option when a tag is added. [GH-2227]
1.19 - (November 4, 2018)
FEATURES:
- go.mod file support! This is the first feature for upcoming Go modules
support. The followings are added:
- Syntax highlighting for the
go.modfile. - A new
gomodfiletype is set if ago.modfile has been opened and starts with the linemodule - New :GoModFmt command that formats the
go.modfile - Auto format on save feature for
:GoModFmt, enabled automatically. Can be toggled of with the settingg:go_mod_fmt_autosaveor with the command:GoModFmtAutoSaveToggle[GH-1931]
- Syntax highlighting for the
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.Contextwheng:go_highlight_extra_typesis 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
:GoInfowithg: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 theIdentifiersgroup. [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
ttsnippet 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
:GoInfowheng:go_info_modeisgocode[GH-1915] - Fix highlighting of pointer type in var blocks. [GH-1794]
- Fix
:GoImportwhen 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]
1.18 - (July 18, 2018)
FEATURES:
-
Add :GoIfErr command together with the
<Plug>(go-iferr)plug key to create a custom mapping. This command generates anif err != nil { return ... }automatically which infer the type of return values and the numbers. For example:func doSomething() (string, error) { f, err := os.Open("file") }Becomes:
func doSomething() (string, error) { f, err := os.Open("file") if err != nil { return "", err } } -
Two new text objects has been added:
ic(inner comment) selects the content of the comment, excluding the start/end markers (i.e://,/*)ac(a comment) selects the content of the whole commment block, including markers To use this new feature, make sure you use use the latest version of motion. You can update the tool from Vim via:GoUpdateBinaries[GH-1779]
-
Add
:GoPointsToto show all variables to which the pointer under the cursor may point to. [GH-1751] -
Add
:GoReportGitHubIssueto initialize a new GitHub issue with as much data that our template requests as possible. [GH-1738]
IMPROVEMENTS:
- Add build tags (with
g:go_build_tags) to all commands that support it. [GH-1705] - Some command which operate on files (rather than Vim buffers) will now show a
warning if there are unsaved buffers, similar to Vim's
:make. [GH-1754] - Don't return an error from
:GoGurufunctions when the import path is unknown and scope is unneeded. [GH-1826] - Performance improvements for the
go.vimsyntax file. [GH-1799] - Allow
GoDebugBreakpointandGoDebugCurrenthighlight groups to be overridden by user configuration. [GH-1850] - Strip trailing carriage returns from quickfix errors that are parsed manually. [GH-1861].
- Cleanup title of terminal window. [GH-1861].
- Add
:GoImplis able to complete interfaces by their full import path in addition to the current package name (i.e::GoImpl t *T github.com/BurntSushi/toml.Unmarshalleris now possible) [GH-1884]
BUG FIXES:
- Update the correct window's location list after a long running async job completes, even when the user changes their window layout while the job is running. [GH-1734]
- Apply debugger mappings only for Go buffers, and not all buffers. [GH-1696]
- The
gohtmltmplfiletype will now highlight{{ .. }}syntax HTML attributes and some other locations. [GH-1790] - Use the correct logging flag argument for delve. [GH-1809]
- Fix gocode option string values that would cause gocode settings not to set correctly [GH-1818]
- Fix Neovim handling of guru output. [GH-1846]
- Execute commands correctly when they are in $GOBIN but not $PATH. [GH-1866]
- Open files correctly with ctrlp. [GH-1878]
- Fix checking guru binary path [GH-1886]
- Add build tags to
:GoDefif only it's present [GH-1882]
1.17 - (March 27, 2018)
FEATURES:
- Debugger support! Add integrated support for the
delvedebugger. Use:GoInstallBinariesto installdlv, and see:help go-debugto get started. [GH-1390]
IMPROVEMENTS:
- Add descriptions to neosnippet abbrevations. [GH-1639]
- Show messages in the location list instead of the quickfix list when
gometalinteris run automatically when saving a buffer. Whether the location list or quickfix list is used can be customized in the usual ways. [GH-1652] - Redraw the screen before executing blocking calls to gocode. [GH-1671]
- Add
fe->fmt.Errorf()snippet for NeoSnippet and UltiSnippets. [GH-1677] - Use the async api when calling guru from neovim. [GH-1678]
- Use the async api when calling gocode to get type info. [GH-1697]
- Cache import path lookups to improve responsiveness. [GH-1713]
BUG FIXES:
- Create quickfix list correctly when tests timeout. [GH-1633]
- Apply
g:go_test_timeoutwhen running:GoTestFunc. [GH-1631] - The user's configured
g:go_doc_urlvariable wasn't working correctly in the case when the "gogetdoc" command isn't installed. [GH-1629] - Highlight format specifiers with an index (e.g.
%[2]d). [GH-1634] - Respect
g:go_test_show_namechange for:GoTestwhen it changes during a Vim session. [GH-1641] - Show
g:go_test_show_namevalue for:GoTestfailures if it's available. [GH-1641] - Make sure linter errors for the file being saved are shown in vim74 and nvim. [GH-1640]
- Make sure only linter errors for the file being saved are shown in vim8. Previously, all linter errors for all files in the current file's directory were being shown. [GH-1640]
- Make sure gometalinter is run on the given directories when arguments are given to :GoMetaLinter. [GH-1640]
- Do not run disabled linters with
gometalinter. [GH-1648] - Do not prompt user to press enter after when
gometalinteris called in autosave mode. [GH-1654] - Fix potential race conditions when using vim8 jobs. [GH-1656]
- Treat
'autowriteall'the same as'autowrite'when determining whether to write a buffer before calling some commands. [GH-1653] - Show the file location of test errors when the message is empty or begins with a newline. [GH-1664]
- Fix minisnip on Windows. [GH-1698]
- Keep alternate filename when loading an autocreate template. [GH-1675]
- Parse the column number in errors correctly in vim8 and neovim. [GH-1716]
- Fix race conditions in the terminal handling for neovim. [GH-1721]
- Put the user back in the original window regardless of the value of
splitrightafter starting a neovim terminal window. [GH-1725]
BACKWARDS INCOMPATIBILITIES:
-
Highlighting function and method declarations/calls is fixed. To fix it we had to remove the meaning of the previous settings. The following setting is removed:
go_highlight_methods
in favor of the following settings and changes:
go_highlight_functions: This highlights now all function and method declarations (whereas previously it would also highlight function and method calls, not anymore)go_highlight_function_calls: This higlights now all all function and method calls. [GH-1557]
-
Rename g
g:go_metalinter_excludestog:go_metalinter_disabled. [GH-1648] -
:GoBuilddoesn't append the-iflag anymore due the recent Go 1.10 changes that introduced a build cache. [GH-1701]
1.16 - (December 29, 2017)
FEATURES:
- Add
g:go_doc_urlto change thegodocserver fromgodoc.orgto a custom private instance. Currently onlygodoc -httpinstances are supported. [GH-1957]. - New setting
g:go_test_prepend_name(off by default) to add the failing test name to the output of:GoTest[GH-1578]. - Support denite.vim for
:GoDecls[Dir][GH-1604].
IMPROVEMENTS:
:GoRenameis a bit smarter when automatically pre-filling values, and what gets pre-filled can be configured withg:go_gorename_prefilloption. In addition:GoRename <Tab>now lists some common options. [GH-1465].- Add support for
g:go_build_tagsto the:GoTestfamily of functions. [GH-1562]. - Pass
--teststo gometalinter when autosaving and when a custom gometalinter command has not been set. [GH-1563]. - Do not spam messages when command is run in a directory that does not exist. [GH-1527].
- Run
syntax sync fromstartafter:GoFmt; this should make syntax highlighting break slightly less often after formatting code [GH-1582]. :GoDescribedoesn't require a scope anymore [GH-1596].- Add some standard snippets for vim-minisnip [GH-1589].
g:go_snippet_enginenow defaults toautomaticto use the first installed snippet engine it can find. [GH-1589].- Make sure temporary files created for
:GoFmtend with.gosuffix as this is required by some Go formatting tools [GH-1601].
BUG FIXES:
- Fix compatibility with Vim version before 7.4.1546 [GH-1498].
- Don't resize godoc window if it's already visible [GH-1488].
:GoTestCompileproduces a test binary again. The test binary will be written to a temporary directory to avoid polluting the user's working directory. [GH-1519]- Fix incorrect
:GoSameIdsTogglebehavior when there were match groups present, but none were goSameId. [GH-1538] - Fix
gplsnippet for UltiSnips. [GH-1535] - Fix test output processing to correctly handle panics and log statements. [GH-1513]
:GoImpltab-completion would sometimes stop working [GH-1581].- Add
g:go_highlight_function_argumentsto highlight function arguments. [GH-1587]. - Fix installation of
gocodeon MS-Windows. [GH-1606]. - Fix template creation for files in directories that don't exist yet. [GH-1618].
- Fix behavior of terminal windows and resize terminal windows correctly for
all valid
g:go_term_modevalues. [GH-1611].
BACKWARDS INCOMPATIBILITIES:
- Display a warning for Vim versions older than 7.4.1689. Older versions may
still work, but are not supported. You can use
let g:go_version_warning = 0to disable the warning. [GH-1524]. g:go_autodetect_gopathis disabled by default, as support forvendorhas been in Go for a while.
Also change the implementation forg:go_autodetect_gopath; instead of manually setting it before every command it will now be set with theBufEnterevent, and reset with theBufLeaveevent. This means that$GOPATHwill be changed for all commands run from Vim. [GH-1461] and [GH-1525].- Update
:GoFillStructto check the current line (vs. the exact cursor position) for a struct literal to fill. To support this, fillstruct made backwards imcompatible changes. [GH-1607].
1.15 - (October 3, 2017)
FEATURES:
- Add
:GoFillStructto fill a struct with all fields; usesfillstruct[GH-1443].
IMPROVEMENTS:
-
:GoAddTagsand:GoRemoveTagsnow continue to process if there are malformed individual struct tags (run:GoUpdateBinariesto updategomodifiytagsbinary) [GH-1401] -
:GoAddTagsand:GoRemoveTagsnow shows a location list if there are malformed struct tags (run:GoUpdateBinariesto updategomodifiytagsbinary) [GH-1401] -
Add folding of the package-level comment (enabled by default) and/or any other comments (disabled by default) [GH-1377]. [GH-1428].
-
Allow using :GoImpl on the type and struct parts too. Makes it a wee bit easier to use [GH-1386]
-
:GoDefsets the path of new buffers as relative to the current directory when appropriate, instead of always using the full path [GH-1277]. -
Syntax highlighting for variable declarations and assignments (disabled by default) [GH-1426] and [GH-1458].
-
Support relative imports for
:GoImpl[GH-1322]. -
A new
g:go_list_type_commandssetting is added to individually set the list type for each command [GH-1415]. As en example:let g:go_list_type_commands = {"GoBuild": "quickfix", "GoTest": "locationlist"} -
Show unexpected errors better by expanding newlines and tabs [GH-1456].
-
:GoInstallBinariesand:GoUpdateBinariescan now install/update only the selected binaries (e.g.:GoUpdateBinaries guru golint) [GH-1467].
BUG FIXES:
-
:GoFmtnow (again) useslocationlistto show formatting errors instead ofquickfix. To change back tolocationlistyou can change it with the settinglet g:go_list_type_commands = { "GoFmt": locationlist" }[GH-1415] -
Include comments in import block when folding is enabled [GH-1387]
-
Fix opening definitions in tabs [GH-1400]
-
Fix accidentally closing quickfix window from other commands if :GoFmt or autosave format was called [GH-1407]
-
Fix entering into insert mode after for term mode in nvim [GH-1411]
-
When using :GoImpl on type foo struct{} it would work, but with:
type foo struct{ }or with a struct with fields, it would create the generated methods inside the struct [GH-1386]
-
:GoImploutput would include extra newline, and error would include trailing newline from shell command:vim-go: invalid receiver: "} *}"<00>. Fixed with [GH-1386] -
Run
:GoMetaLinteragainst the package of the open file [GH-1414]. -
The
g:go_doc_commandandg:go_doc_optionsto configure the command for:GoDocwere documented but never referenced [GH-1420]. -
go#package#FromPath()didn't work correctly [GH-1435]. -
Fix race condition for
gurubased commands [GH-1439]. -
The
gohtmltmplfiletype now sources thehtmlftplugin, so thatmatchit, completion, and some other things work better. [GH-1442] -
Fix
:GoBuildshell escaping [GH-1450]. -
Ensure fmt list gets closed when title cannot be checked [GH-1474].
BACKWARDS INCOMPATIBILITIES:
-
:GoMetaLinternow 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. [GH-1414] -
:GoImplnow requiresimplversion 3fb19c2c or newer (released June 13, 2017); use:GoUpdateBinariesto make sure that you've got a recent version [GH-1322]
1.14 - (August 6, 2017)
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, andconstblocks, and package-level comments. These can be individually disabled/enabled if desired. For more info please read the documentation for theg:go_fold_enablesetting. [GH-1339] [GH-1377] :GoFilesaccepts now an argument to change the type of files it can show. By default it shows.go source filesbut now it can be changed to show various kind of files. The full list can be seen viago list --helpunder the// Source Filessection [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.goextension have a new template with a ready to go test function. The template can be changed with theg:go_template_test_filesetting. [GH-1318] - Improve performance for highly used operations by caching
go envcalls [GH-1320] :GoCoveragecan accept arguments now. i.e::GoCoverage -run TestFoo[GH-1326]:GoDeclsand:GoDeclsDirshows a warning if ctrlp.vim is not installed:GoBuildnow compiles the package with the-iflag added. This means that subsequent calls are much more faster due caching of packages [GH-1330]:GoCoverageechos now the progress ifg:go_echo_command_infois enabled [GH-1333]- Add
g:go_doc_max_heightsetting to control the maximum height of the window created by:GoDocandKmapping [GH-1335] - The
aftext object is able to include the assignment variable for anonymous functions. Can be disabled withg:go_textobj_include_variable = 0[GH-1345] - Add
g:go_list_autoclosesetting to prevent closing the quickfix/location list after zero items [GH-1361] - Cursor is now adjusted and locked to the correct line when
goimportsis 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
:GoTestis 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
:GoFmtis 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
:GoFmterrors [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
gogetdocwas 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:
:GoFmtnow usesquickfixto show formatting errors instead oflocationlist. To change back tolocationlistyou can change it with the settinglet g:go_list_type = "locationlist"[GH-1365]:GoLintnow 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]
1.13 - (June 6, 2017)
FEATURES:
- New
:GoKeyifycommand 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_transformsetting to change the transform rule (snakecase, camelcase, etc..) for:GoAddTagscommand [GH-1275] - New snippet shortcut assigned to
ifethat expands toif err := foo(); err != nil { ... }[GH-1268]
IMPROVEMENTS
- :GoMetaLinter can now exclude linters with the new
g:go_metalinter_excludesoption [GH-1253] - Override
<C-LeftMouse>mapping so:GoDefis used by default (as we do the same forCTRL-],gd, etc. [GH-1264] - add support for
go_list_typesetting in:GoFmtand:GoImportscommands [GH-1304] - add support for
go_list_typesetting in:GoMetaLintercommands [GH-1309] go_fmt_optionscan 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,
cygpathis 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
interfaceandstructswords whengo_highlight_typesis enabled [GH-1301] - fix cwd for running
:GoRunwhen used with neovim [GH-1296] :GoFmthandles 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]:GoTestis able to parse error messages that include a colon:[GH-1316]:GoTestCompileunder the hood doesn't produces a test binary anymore. Sometimes a race condition would happen which would not delete the test binary. [GH-1317]:GoDefjumps now to definition for build tags defined with:GoBuildTags(only guru) [GH-1319]
BACKWARDS INCOMPATIBILITIES:
:GoLintworks 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_typeis removed in favor of the newgo_addtags_transformsetting [GH-1299]go_imports_binis removed to avoid confusion as it would lead to race conditions when set togofmtalong with the usage ofgo_fmt_command[GH-1212] [GH-1308]- commands such as
:GoTesthas 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
1.12 - (March 29, 2017)
FEATURES:
- New
:GoAddTagsand:GoRemoveTagscommand based on the tool gomodifytags. This fixes many old bugs that were due prior regexp based implementation. For the usage please read the docs and checkout the demo at: https://github.com/fatih/vim-go/pull/1204 [GH-1204] - Add new
errlsnippet that expands to [GH-1185]:
if err != nil {
log.Fatal(err)
}
- New
:GoBuildTagscommand to change build tags for tools such asguru,gorename, etc ... There is also a new setting calledg:go_build_tags[GH-1232]
IMPROVEMENTS:
- vim-go works now even if GOPATH is not set (starting with Go 1.8) [GH-1248]
- Lowercase
<Leader>in mappings examples for consistent documentation across the README [GH-1192] - All of files should be written in utf-8 if the file will be passed to external command. [GH-1184]
:GoAddTagsis now able to add options to existing tags with the syntax:GoAddTags key,option, i.e::GoAddTags json,omitempty[GH-985]- Document 'noshowmode' requirement for echo_go_info [GH-1197]
- Improve godoc view for vertical splits [GH-1195]
- Set GOPATH for both possible go guru execution paths (sync and async) [GH-1193]
- Improve docs for :GoDef usage [GH-1242]
- Highlight trimming syntax for Go templates [GH-1235]
BUG FIXES:
- Honor
g:go_echo_command_infowhen dispatching builds in neovim [GH-1176] - Fix
:GoBuilderror in neovim due to invalid jobcontrol handler function signatures (s:on_stdout,s:on_stderr)[GH-1176] - Update statusline before and after
go#jobcontrol#Spawncommand is executed [GH-1176] - Correctly report the value of the 'g:go_guru_tags' variable [GH-1177]
- Ensure no trailing
:exist in GOPATH detection if initial GOPATH is not set [GH-1194] - Fix
:GoAddTagsto allow modifying existing comments [GH-984] - Fix
:GoAddTagsto work with nested structs [GH-990] - Fix
:GoAddTagsadding tags twice for existing tags [GH-1064] - Fix
:GoAddTagsnot working for fields of typesinterface{}[GH-1091] - Fix
:GoAddTagsnot working for fields with one line comments [GH-1181] - Fix
:GoAddTagsnot working if any field comment would contain{}[GH-1189] - Respect go_fmt_options when running goimports [GH-1211]
- Set the filename in the location-list when there is an error with :GoFmt [GH-1199]
- Fix
:GoInstallto accept additional arguments if async mode was enabled [GH-1246]
BACKWARDS INCOMPATIBILITIES:
- The command
:GoGuruTagsis removed in favour of the new command:GoBuildTags. This command will be used now not just forguru, also for all new commands such asgorename[GH-1232] - The setting
g:go_guru_tagsis removed in favour of the new settingg:go_build_tags[GH-1232]
1.11 - (January 9, 2017)
FEATURES:
- Travis test integration has been added. Now any file that is added as
<name>_test.vimwill be automatically tested in for every Pull Request (just like how we add tests to Go with_test.go). Going forward this will tremendously increase the stability and decrease the maintenance burden of vim-go. [GH-1157] - Add new
g:go_updatetimesetting to change the default updatetime (which was hardcoded previously) [GH-1055] - Add new
g:go_template_use_pkgsetting to enable to use cwd as package name instead of basic template file [GH-1124]
IMPROVEMENTS:
- Add
statuslinesupport for:GoMetaLinter[GH-1120] - Quickfix and Location lists contain now a descriptive title (requires at least Vim
7.4.2200)[GH-1004] - Check
go env GOPATHas well for:GoInstallBinariesas Go has now a default path for GOPATH ("~/go")starting with 1.8 [GH-1152] :GoDocBrowsernow also works on import paths [GH-1174]
BUG FIXES:
- Always use full path to detect packages to be shown in statusline [GH-1121]
- Use
echomto persist errors in case of multiple echos [GH-1122] - Fix a race condition where a quickfix window was not closed if a job has succeeded [GH-1123]
- Do not expand coverage arguments for non job execution of
:GoCoverage[GH-1127] :GoCoveragedoesn't mess up custom syntax anymore [GH-1128]- Disable autoformat for
asmfiles as they might be non Go ASM format [GH-1141] - Fix indentation broken when using a action with a minus sign like
{{-[GH-1143] - Fix breaking Neovim change of passing less arguments to callbacks [GH-1145]
- Fix
gurucommands if custom build tags were set [GH-1136] - Fix referencing a non defined variable for async commands when bang (!) was used
- Fix
:GoDeffailing for a modified buffer ifhiddenwas not set [GH-1132] - Fix
:GoDefStackto allow popping from jump list when buffer is modified [GH-1133] - Improve internal defining of functions and referencing them for async operations [GH-1155]
- Fix
:GoMetaLinterfailing ifgo_metalinter_commandis set. [GH-1160] - Fix
:GoMetaLinter'sgo_metalinter_deadlinesetting for async mode [GH-1146]
BACKWARDS INCOMPATIBILITIES:
- The following syntax options are now disabled by default. If you're using them be sure to set them in your .vimrc [GH-1167]
g:go_highlight_array_whitespace_error
g:go_highlight_chan_whitespace_error
g:go_highlight_extra_types
g:go_highlight_space_tab_error
g:go_highlight_trailing_whitespace_error
1.10 (November 24, 2016)
FEATURES:
-
Vim 8.0 support! This is the initial version to add Vim 8.0 based support to all basic commands (check out below for more information). With time we'll going to extend it to other commands. All the features are only enabled if you have at least Vim 8.0.0087. Backwards compatible with Vim 7.4.x. If you see any problems, please open an issue.
-
We have now a logo for vim-go! Thanks to @egonelbre for his work on this.
-
:GoBuild,:GoTest,:GoTestCompile,:GoInstallcommands are now fully async. Async means it doesn't block your UI anymore. If the command finished it echoes the status. For a better experience use the statusline information (more info below) -
:GoCoverageand:GoCoverageBrowsercommands are fully async. -
:GoDefis fully async ifguruis used as command. -
:GoRenameis fully async . -
:GoMetaLinteris fully asnyc. Also works with the current autosave linting feature. As a reminder, to enable auto linting on save either call:GoMetaLinterAutoSaveToggle(temporary) or addlet g:go_metalinter_autosave = 1(persistent) to your virmc). -
All
gurucommands run asynchronously if Vim 8.0 is being used. Current Commands:- GoImplements
- GoWhicherrs
- GoCallees
- GoDescribe
- GoCallers
- GoCallstack
- GoFreevars
- GoChannelPeers
- GoReferrers
-
:GoSameIdsalso runs asynchronously. This makes it useful especially for auto sameids mode. In this mode it constantly evaluates the identifier under the cursor whenever it's in hold position and then calls :GoSameIds. As a reminder, to enable auto info either call:GoSameIdsAutoToggle(temporary) or addlet g:go_auto_sameids = 1(persistent) to your vimrc. -
:GoInfois now non blocking and works in async mode ifguruis used ing:go_info_mode. This makes it useful especially for autoinfo mode. In this mode it constantly evaluates the identifier under the cursor whenever it's in hold position and then calls :GoInfo. As a reminder, to enable auto info either call:GoAutoTypeInfoToggle(temporary) or addlet g:go_auto_type_info = 1(persistent) to your vimrc. To useguruinstead ofgocodeadd following to your vimrc:let g:go_info_mode = 'guru'The
guruis more accurate and reliabed due the usage ofgurudescribe. It doesn't rely onpkg/folder likegocodedoes. However it's slower thangocodeas there is no caching mechanism inguruyet. -
New: Statusline function:
go#statusline#Show()which can be plugged into the statusline bar. Works only with vim 8.0. It shows all asynchronously called functions status real time. Checkout it in action: https://twitter.com/fatih/status/800473735467847680. To enable it add the following to yourvimrc. If you use lightline, airline, .. check out their respective documentation on how to add a custom function:
" go command status (requires vim-go)
set statusline+=%#goStatuslineColor#
set statusline+=%{go#statusline#Show()}
set statusline+=%*
IMPROVEMENTS:
- :GoDocBrowser is now capable to to understand the identifier under the cursor (just like :GoDoc)
- Function calls are now highlighted as well when
g:go_highlight_functionsis enabled [GH-1048] - Add completion support for un-imported packages. This allows to complete even
if the package is not imported. By default it's disabled, enable by adding
let g:go_gocode_unimported_packages = 1[GH-1084] - Tools that embeds GOROOT into their binaries do not work when people update
their Go version and the GOROOT contains the vesion as part of their path
(i.e:
/usr/local/Cellar/go/1.7.2/libexec, more info) . This is now fixed by introducing automatic GOROOT set/unset before each tool invoke. [GH-954] - Added new setting
g:go_echo_go_infoto enable/disable printing identifier information when completion is done [GH-1101] - Added new
go_echo_command_infosetting is added, which is enabled by default. It's just a switch for disabling messages of commands, such as:GoBuild,:GoTest, etc.. Useful to disable ifgo#statusline#Show()is being used in Statusline, to prevent to see duplicates notifications. - goSameId highlighting is now linked to
Search, which is much more clear as it changes according to the users colorscheme - Add plug mapping
(go-lint)for :GoLint [GH-1089]
BUG FIXES:
- Change back nil and iota highlighting color to the old type [GH-1049]
- Fix passing arguments to
:GoBuildwhile using NeoVim [GH-1062] - Do not open a split if
:GoDefis used on a modified file [GH-1083] - Highlight nested structs correctly [GH-1075]
- Highlight builtin functions correctly if
g:go_highlight_functionsis enabled [GH-1070] - Fix
:GoSameIdshighlighting if a new buffer is opened in the same window [GH-1067] - Internal: add
abortto all vim function to return in case of errors [GH-1100] - Fix
:GoCoverageto be executed if working dir is not inside the test dir [GH-1033]
BACKWARDS INCOMPATIBILITIES:
-
remove vim-dispatch and vimproc.vim support. vim 8.0 has now the necessary API to invoke async jobs and timers. Going forward we should use those. Also this will remove the burden to maintain compatibility with those plugins.
-
go#jobcontrol#Statusline()is removed in favor of the new, global and extensiblego#statusline#Show()
1.9 (September 13, 2016)
IMPROVEMENTS:
- guru uses now the
-modifiedflag, which allows us use guru on modified buffers as well. This affects all commands whereguruis used. Such as:GoDef,:GoReferrers, etc.. [GH-944] - :GoDoc uses now the
-modifiedflag under the hood (for `gogetdoc), which allows us to get documentation for the identifier under the cursor ina modified buffer. [GH-1014] - Cleanup and improve documentation [GH-987]
- Add new
g:go_gocode_socket_typesetting to change the underlying socket type passed togocode. Useful to fallback totcpon cases such as Bash on Windows [GH-1000] :GoSameIdsis now automatically re-evaluated in cases of buffer reloads (such as:GoRename) [GH-998]- Improve docs about
go_auto_sameids[GH-1017] - Improve error message by printing the full path if an incompatible
goimportsis being used [GH-1006] iotaandnilare now highlighted correctly and are not treated as booleans [GH-1030]
BUG FIXES:
- Fix system calls on Windows [GH-988]
- Fix :GoSameIds and :GoCoverage for light background and after changing color schemes [GH-983]
- Fix TagBar and
GoCallersfor Windows user [GH-999] - Set updatetime for for
auto_sameidsfeature as well [GH-1016] - Update docs about missing
go_highlight_generate_tagssetting [GH-1023] - Fix updating the jumplist if
:GoDefis used [GH-1029] - Fix highlighting literal percent sign (
%%) in strings [GH-1011] - Fix highlighting of nested fields [GH-1007]
- Fix checking for
exepathfeature for the upcoming vim 8.0 release [GH-1046]
BACKWARDS INCOMPATIBILITIES:
- Rename
GoMetalinterAutoSaveToggletoGoMetaLinterAutoSaveToggleto make it compatible with the existing:GoMetaLintercommand [GH-1020]
1.8 (July 31, 2016)
FEATURES:
- New
:GoAddTagscommand that adds field tags for the fields of a struct automatically based on the field names. Checkout the demo to see it in action: https://twitter.com/fatih/status/759822857773907968 [GH-971] - The snippet expansion
jsonis now much more smarter. It pre populates the placeholder according to the first word and it also appliessnake_caseorcamelCaseconversion. Together with:GoAddTagsit givesvim-gousers flexible ways of populating a field tag. Checkout the demo to see it in action: https://twitter.com/fatih/status/754477622042689536 [GH-927] - New
:GoSameIdscommand. When called highlights all same identifiers in the current file. Can be also enabled to highlight identifiers automatically (with:GoSameIdsAutoToggleorg:go_auto_sameids). Checkout the demo to see it in action: https://twitter.com/fatih/status/753673709278339072. [GH-936] - New
:GoWhicherrscommand. It shows all possible values of the selected error variable. [GH-948] - Add new
errpsnippet to expand anif err != nil { panic() }clause [GH-926] - If you open a new buffer with a Go filename it get automatically populated based on the directory. If there are no Go files a simple main package is created, otherwise the file will include the package declaration line based on the package in the current directory. Checkout the demo to see it in action: https://twitter.com/fatih/status/748333086643994624. This is enabled by default. Can be disabled with
let g:go_template_autocreate = 0. You can use your own template withlet g:go_template_file = "foo.go"and putting the file under thetemplates/folder. [GH-918] - Added new toggle commands to enable/disable feature that run for your
automatic. For example if you have
let g:go_auto_type_info = 1enabled, you can now easily enable/disable it on the fly. Support added with the following commands::GoAutoTypeInfoToggle,:GoFmtAutoSaveToggle,:GoAsmFmtAutoSaveToggle,:GoMetalinterAutoSaveToggle,:GoTemplateAutoCreateToggle[GH-945]
IMPROVEMENTS:
:GoDocaccepts arguments now which are passed directly togodoc. So usages like:GoDoc flagworks again (it was changed in previous versions [GH-894]:GoDefworks now for modified files as well [GH-910]- Internal: pass filename to the
--srcdirflag to enable upcominggoimportsfeatures [GH-957] - Internal: fix indentations on all files to 2-spaces/no tabs. This is now the default vim-go style across all VimL files [GH-915]
- Internal: autocmd settings can be now dynamically enabled/disabled [GH-939]
- Internal: automatically detect
GOPATHfor :GoInstall [GH-980] - Internal: shell executions uses now by default
shand then resets it back to the user preference. [GH-967] - Syntax: improved syntax highglighting performance for methods, fields, structs and interface type declarations [GH-917]
- Syntax: moved
:GoCoveragehighlight definition into go's syntax file for more customizability [GH-962]
BUG FIXES:
- Escape
#characters when opening URL's, as it's handled as alternative file in vim [GH-895] - Fix typos in
doc/vim-go.txtabout usages of syntax highglightings [GH-897] - Fix
:GoCoveragenot running for Neovim [GH-899] - Fix
:GoFmtnot picking up-srcdirif the command was set to usegoimports[GH-904] - Fix
:GoTestCompileto not leave behind artifacts if the cwd and the test files's directory do not match [GH-909] - Fix
:GoDocBrowserto not fail if godoc doesn't exist [GH-920] - Fix
:GoFmtto not change the permissions of saved file. Now original file permissions are restored [GH-922]
BACKWARDS INCOMPATIBILITIES:
g:go_highlight_structsandg:go_highlight_interfaceare removed in favor ofg:go_highlight_types[GH-917]
1.7.1 (June 7, 2016)
BUG FIXES:
- Fixed typo in
syntax/go.vimfile fromgo:go_highlight_fieldstog:go_highlight_fields
1.7 (June 7, 2016)
FEATURES:
- New
:GoImplcommand that generates method stubs for implementing an interface. Checkout the demo to see how it works. [GH-846] godefsupport is added back as an optional setting. By default:GoDefstill usesguru, but can be changed togodefby adding the option:let g:go_def_mode = 'godef'[GH-888]- New
<C-w><C-]>and<C-w>]>shortcuts to split current window and jumpt to the identifier under cursor. [GH-838] - New syntax setting"
g:go_highlight_fieldsthat highlights struct field references [GH-854]
IMPROVEMENTS:
- Invoking
:GoRenamenow reloads all files to reflect new changes automatically [GH-855] - Calling
:GoTestCompiledoes not create any temporary binary file anymore [GH-879] - Enable passing the
-tagsflag to:GoDef. Now you can pass build tags to:GoDefvia:GoGuruTagsorg:go_guru_tags - Internal refactoring to use custom
system()function that wraps both the standardsystem()call andvimproc. Now all system calls will take advantage and will usevimprocif installed. [GH-801] - Completion enables now
gocode'sautobuildandpropose-builtinsflags automatically. With these settings packages will be automatically build to get the freshest completion candidates and builtin keywords will be showed as well. By defaults these settings are enabled. Settings can be disabled/enabled viag:go_gocode_autobuildandg:go_gocode_propose_builtins. [GH-815] - Added new
http.HandlerFuncsnippets withhfandhhfshortcuts [GH-816] - Added new
ExampleandBenchmarksnippets withexampleandbenchmarkshortcuts [GH-836] - Search tool binaries first in
GOBINand then inPATHas most of vim-go users installs it toGOBINmostly [GH-823] - Improve
gurubased commands by providing automatically detected GOPATHS, such asgb,godepto be used if possible [GH-861] - Add
<Plug>(go-imports)mapping to make it assignable to other keys [GH-878] - Increase compatibility with tcsh [GH-869]
- Improve
:GoInstallBinariesfor GOPATH's which don't have packages that work well withgo get -u. We have a newg:go_get_updatesetting to disable it. By default it's enabled. [GH-883]
BUG FIXES:
- Fix
(go-freevars)plug mapping to work as in visual mode instead of noncompatible normal mode [GH-832] - Commands based on guru now shows a more meaningful error message instead of just showing the exit status (-1)
- Fix
:GoCoverageaccidentally enabling syntax highlighting for users who don't use syntax (i.e syntax off) [GH-827] - Fix
:GoCoveragecolors to work for xterm as well [GH-863] - Fix commenting out block of texts for Go templates (filetype gothtmltmpl) [GH-813]
- Fix
:GoImplementsfailing because of an empty scope definition. Now we default to current package to make it usable. - Fix
:GoPlayposting to non HTTPS url. [GH-847] - Fix escaping the filenames for lint and motion commands [GH-862]
- Fix escaping the filename to
:GoDefcompletely for tcsh [GH-868] - Fix showing SUCCESS for
go testrelated commands if no test files are available [GH-859]
1.6 (April 25, 2016)
FEATURES:
- New
CHANGELOG.mdfile (which you're reading now). This will make it easier for me to track changes and release versions :GoCoverageis now highlighting the current source file for covered/uncovered lines. If called again it runs the tests and updates the annotation. Use:GoCoverageClearto clear the coverage annotation. This is a pretty good addition to vim-go and I suggest to check out the gif that shows it in action: https://twitter.com/fatih/status/716722650383564800 [GH-786]:GoCoverageTogglejust like:GoCoveragebut acts as a toggle. If run again it clears the annotation.:GoCoverageBrowseropens a new annotated HTML page. This is the old:GoCoveragebehavior [GH-786]:GoDocuses now gogetdoc to lookup and display the comment documentation for the identifier under the cursor. This is more superior as it support looking up dot imports, named imports and imports where package name and file name are different [GH-782]guru support:oracleis replaced by the new toolguru.oracle.vimis therefore renamed toguru.vim. I've also refactored the code to make it much more easier to maintain and add additional features in future (such as upcoming JSON decoding). vim-go is now fully compatible withguru. Please be sure you have installedguru. You can easily do it with:GoInstallBinaries.:GoDefuses nowguru definitionunder the hood instead ofgodef. This fixes the following issues: 1. dot imports 2. vendor imports 3. folder != package name imports. The toolgodefis also deprecated and not used anymore.:GoDefdoes have now history of the call stack. This means you can easily jump back to your last entry. This can be done with the new command:GoDefPopor the mappingCTRL-t. To see the stack and jump between entries you can use the new command:GoDefStack, which shows the list of all stack entries. To reset the stack list anytime you can call:GoDefStackClear[GH-776]
IMPROVEMENTS:
:GoCoverageis executed asynchronously when used within Neovim [GH-686]:GoTestFuncsupports now testable examples [GH-794]:GoDefcan jump to existing buffers instead of opening a new window (split, vsplit or tab). By default it's disabled to not break the old behavior, can be enabled withlet g:go_def_reuse_buffer = 1
BUG FIXES:
- Fix not showing documentation for dot, named and package/file name being different imports [GH-332]
- Term mode: fix closing location list if result is successful after a failed attempt [GH-768]
- Syntax: fix gotexttmpl identifier highlighting [GH-778]
- Doc: fix wrong wording for
go-runmapping. It's for the whole main package, not for the current file
BACKWARDS INCOMPATIBILITIES:
:GoDefdoesn't accept any identifier as an argument. This is not suported viaguru definitionand also was not widely used either. Also with this, we significantly simplified the existing def.vim code:GoOracleScopeand:GoOracleTagsare deprecated in favor of:GoGuruScopeand:GoGuruTags. Alsog:go_oracle_scopeis renamed tog:go_guru_scopeg:go_guru_scopeaccepts a variable in type oflistinstead ofstring. i.g:let g:go_guru_scope = ["github.com/fatih/structs", "golang.org/x/tools/..."]
1.5 (Mar 16, 2016)
FEATURES:
- Introducing code name "motion". A new whole way of moving
around and navigating [GH-765]. Checkout the following new changes:
- A vim-go specific tool, called motion is being developed which provides us the underlying foundation for the following and upcoming new features.
]]and[[motions can be used to jump between functionsifandafare improved and implement from scratch. It has now support for literal functions, comments of functions, better cursor position support and more stable.- New
:GoDeclsand:GoDeclsDircommands that are available ifctrlp.vimis installed. Once called one can easily jump to any generic declaration available. - I wrote two blog posts about these new features in more detail. I recommend you to read it: Treating Go types as objects in Vim and Navigation between functions and types in vim-go
- A new
:GoAlternatecommand that toggles to the test file of the current file. It also has new appropriate mappings to open the alternate file in split or tabs. [GH-704] - Now commands can choose whether they want to open a
quickfixor alocation listvia the settingg:go_list_type. Also all the commands have now some sensible settings, some will open a qf window, some will open a location list [GH-700]
IMPROVEMENTS:
- Add support for goimport's new
-srcdir. Goimports now succesfully suportsvendor/folders with this release. [GH-735] - Add
g:go_gorename_prefillsetting which disabled pre filling the argument for:GoRename[GH-711] - Improve
:GoRunto complete to filenames [GH-742] - Highlight
//go:generatecomment directives [GH-757] - Indent code in Go HTML templates [GH-709]
- Improve negative numbers of all types, octals, imaginary numbers with exponents [GH-752]
- Improved internal usage of retrieving offsets [GH-762]
- Improve by substitute all backslashes to slashes for filename [GH-703]
- Improve internal Go package path function [GH-702]
- Improved typo and grammar errors in docs [GH-714]
- Improved internal
:GoInfoautomatic call [GH-759]
BUG FIXES:
- Fix oracle scope not working if trailing slash exists in scope [GH-751]
- Fix
:GoErrCheckchecking abspath [GH-671] - Fix
:GoInstallcorrectly parsing errors [GH-692] - Fix
:GoInstallcorrectly parsing errors [GH-692] - Fix
:GoTestFuncfor neovim [GH-695] - Fix
:GoRunaccepting arguments for neovim [GH-730] - Fix
go runmappings not working [GH-542] - Fix autodetect gopath picking up non existing GB vendor folder
- Fix gofmt errors showing per buffer instead of per script [GH-721]
- Fix some of the neosnippet snippets
1.4 (Jan 18, 2016)
FEATURES:
- You waited for it for a long time. And here you have it: Neovim support!
This is a huge feature. It's fully compatible with Vim and kicks only in if
vim-go is being used within Neovim. Checkout the full list of changes
[GH-607]:
- An async launcher and base foundation was implemented for the
gocommand. This will be used in the future for all upcoming subcommands of thegotool. :GoBuildis now called asynchronously (it doesn't block the UI anymore).- A new
go#jobcontrol#Statusline()can be used to plug into the statusline. This will show the status of the job running asynchronously. The statusline is improved to show the status per package instead of file. Assume you have three files open, all belonging to the same package, if the package build (:GoBuild) is successful, all statusline's will be empty (means SUCCESS), if it fails all files statusline's will showFAILED. :GoRunopens a new vertical terminal emulator inside Neovim and runs the command there. The terminal mode can be changed withg:go_term_mode, which is by defaultvsplit. Current options arevsplit, split or tab. We also have three new mappings to open:GoRuncommand in different terminal split modes:<Plug>(go-run-vertical),<Plug>(go-run-split)and<Plug>(go-run-tab):GoTest,:GoTestFuncand:GoTestCompileopens and runs in a new terminal. The view mode (split,vertical, tab) is defined withg:go_term_mode. Theg:go_term_enabledsetting can be use to change the behavior of:GoTestXXXcommands .If set to1, it opens the test commands inside a terminal, if not it runs them in background just like:GoBuildand displays the result in the statusline.- We have two settings for terminal sizes:
g:go_term_heightandg:go_term_width. By default a vertical or horizontal view is equally splitted by vim automatically. However with these settings we can for example have a terminal with a smaller height when we split it horizontally. - If a command inside the term fails (such as
go run,go test...) we parse now the errors and list them inside a location list.
- An async launcher and base foundation was implemented for the
- Instead of quickfix window, vim-go now uses the
location listfeature of Vim. These are associated with each window independently of each other. This enables us to have multiple, independent location lists per window (example usages::GoBuildwith errors that needs to be fixed,:GoLintwith warnings that we want to check,:GoReferrerswith a list of referred identifiers) [GH-626] - a new
:AsmFmtcommand which is integrated to work with asmfmt [GH-673] - the full identifier information of a completed identifier is echoed in statusline. This is very useful to see a function signatures arguments. [GH-685]
IMPROVEMENTS:
- Improve
:GoFmtby checking if the binary is indeed installed on the system [GH-617] - Improve
:GoMetaLinterby adding the option to run the metalinter on save and adding the option to limit the output to the currently active buffer. Setlet g:go_metalinter_autosave = 1to enable autosave and uselet g:go_metalinter_autosave_enabled = ['vet', 'golint']to change your options. [GH-631] - Improved
:GoDef. Ifvimprocis installedgodefwill make use of it [GH-670] - Improve completion of godoce when vimproc is used [GH-620]
- Improve internal error matching prodecure to not match false positives [GH-618]
- A new option to highlight interface variables with
go_highlight_interfaces[GH-681]
BUG FIXES
- Fix
:GoFmtchanging the fileformat of the current buffer [GH-615] - Fix
:GoRenameto output the original error if parsing fails [GH-675] - Fix
:GoTestto output the original error if parsing fails [GH-676] - Fixed
fmt.Fprintlnnot to highlight as builtin [GH-628] - Fixed wrong highlighting of channels of channels [GH-678]
1.3 (Nov 22, 2015)
FEATURES:
- A new
:GoOracleTagscommand was added to pass build tags to Oracle's-tagsflag. [GH-573]
IMPROVEMENTS:
- Change
:GoTestcommand to timeout after 10 seconds. Vim UI is blocking and tests with large running times makes Vim blocking for a long time. This is also customizable with the new optiong:go_test_timeout. [GH-578] - Improve
:GoRenameto collect and populate quickfix window with errors. [GH-577] - Improve
:GoRunby dropping bad filenames from quickfix window. This allows us to have only valid entries which can be jumped to [GH-547] - Improve
:GoMetaLinterquickfix output by using absolute paths. This enables us to jump to errors for all cases. [GH-565] - Improve
:GoMetaLintercommand by adding a new optiong:go_metalinter_deadlinewhich cancels the linters after 5 seconds (previous default). [GH-576] - Improve
:GoMetaLinterby jumping to the first encountered error from the quickfix window. - Automatically resize quickfix window based on the number of errors [GH-602]
- Improve build constraints to show invalid cases (such as
// +buildfoo, not having an empty line between the package statement, etc..). Also add missingGOARCHvalues sucha sarm64. There are many other useful improvements, for more detail please have a look at [GH-589] - Add support for all values of
GOARCH[GH-601] - Add note about Syntastic usage as this problem comes up a lot [GH-580]
- Add note about
:GoUpdateBinaries[GH-606]
BUG FIXES:
- Fixed
:GoErrCheckshowing the correct output when executed inside the source folder [GH-564] - Fixed
:GoBuildby not using/dev/nullanymore for build output (not supported bygo). We pass a temporary file now. [GH-567] - Fixed
:GoFmtpassingg:go_fmt_optionsoptions togoimports. This option is only valid withgofmt. [GH-590] - Fix vim-go for
cygwinusers. [GH-575] - Fixed identifier in template files to be highlighted correctly [GH-559]
- Fixed character region in template files to be highlighted correctly [GH-603]
- Fixed variables in template files to be highlighted correctly [GH-611]
- Do not treat builtins as keywords. Now
makewill not highlighted butmake()will be highlighted (gh-605)
1.2 (Oct 2, 2015)
FEATURES:
- A new
:GoMetaLintercommand which invokes gometalinter. Please check the PR [GH-553] for more detail on customizing and usage of:GoMetaLinter.
IMPROVEMENTS:
- Improve
:GoImportto trim spaces when including import paths of form"fmt " - Avoid setting
filetypetwice. Previously it was doing it twice, which was expensive - Improve handling of GOPATH's with trailing
/characters, such as/home/user/go/ - Add a new
g:go_highlight_string_spellcheckfeature, which is enabled by feature. Now if spell is enabled, go strings are also checked. - Specify our limited but functional gb support
BUG FIXES:
- Fixed
:GoRunto display errors wheng:go_dispatch_enabledwas enabled - Fixed
:GoDropdisplaying "Not enough arguments" (regression) - Fixed
:GoErrChecknot showingPASSmessage if the command was successful - Fixed
:GoErrChecknot executing in the directory of the currently edited file - Close quickfix window after a successful second round of
:GoInstall - Fix passing files rather than packages to certain oracle commands.
- Escape files passed to oracle command. This could lead to some serious things.
- Clear
g:go_oracle_scopewhen the scope was reseted. Previously it was set to empty string, which was causing false positives. - Correct various misspellings.
1.1 (Jul 25, 2015)
With this release the version will now increase in minor levels. So the next
release will be 1.2, the other one 1.3, etc.. This provides us more
flexibility (like releasing patch versions if needed).
FEATURES:
- A new
:GoGeneratecommand is now available which can be used to invokego generatewithin vim - Vim-go didn't had any license, now we use BSD 3-Clause License (the same as Go). This is needed for Linux distributions to package vim-go and is also something that people asked for.
IMPROVEMENTS:
- Improve commands
GoRun, GoTest{,Func,Compile}, GoCoverage, GoGenerate, GoErrcheck, GoLint, and GoVetto handle multiple arguments. Previously this feature was limited to only certain commands. What this means is, for example:GoVet . -allwill invokego tool vet . -allautomatically instead of plango vet. This is one of the big changes in this release, so give it a try :) - Improved
:GoFmtcommand, which now uses the-wflag to write to the source code directly, instead of outputting it to stdout. This makes:GoFmtmuch more faster than the current implementation. This is one of the big changes in this release, so feedback is welcome! - Improve
:GoImportto have a!feature. Now when when called with a!appended it will go get it. i.e::GoImport! github.com/fatih/color. Useful if:GoImportfails and you want to download it. - Automatic GOPATH detections can now detect
gbvendored folders. Some commands should now work without any problem when invoked on agbproject. - All command arguments are now properly escaped for shell invocation.
- Added the
-fflag to :GoInstallBinaries command to supportgit url.<base>.insteadOfconfiguration - Improve width and precision highlighting, such as
%s %5s %-5s %5.5f %.5f - Show an error if a region is not selected when
:GoFreeVarsis called
BUG FIXES:
- Fix
:GoDeffor files containing spaces. We know escape the files before passing to:GoDef - Fix
:GoFmtnot picking up the correct GOPATH when the fmt command was set togoimports - Fix and simplify README.md, add Wiki reference
- Fixed tagbar integration to show correct imports.
1.0.5 (May 26, 2015)
FEATURES:
- A new
:GoOracleScopeis added to change the oracle scope on-the-fly. It accepts import paths as arguments. If no arguments are passed it prints the current custom oracle scope.:GoOracleScopealso supports completion of import paths, so it's very fast and handy to use.:GoOracleScope ""clears the current custom scope. - A new
:GoPathcommand that displays the currentGOPATH. A path can be passed to change theGOPATH(i.e:GoPath ~/foo/src).:GoPath ""clears and resets theGOPATHto the initial value. - A new "autodetect GOPATH" feature is added. This automatically detects if the
project is using
godepor is under asrcroot directory which is not inGOPATHand changes/modifies theGOPATHso all commands work based on this GOPATH. What this means is, commands such as:GoDef,:GoBuild, etc.. will include the Godeps folder. For example any go-to-definition via:GoDefwill jump to the source code inside Godeps. This is enabled by default, but can disabled withlet g:go_autodetect_gopath = 0. This new feature is also the foundation for other tools such asgborwgo.
IMPROVEMENTS:
- Improve
:GoFmt(gofmt and goimports) speed. Now it's 2x faster than the previous implementation. - Add Dispatch support for
:GoBuildand:GoRun. For more info about dispatch see https://github.com/tpope/vim-dispatch . By default it's disabled, to enable it addlet g:go_dispatch_enabled = 1to your vimrc. - Add support for the bang
!attribute for allgotool commands. What this does it, if:GoBuildis called it will jump to the error. But:GoBuild!will not jump to any error. This has the same behavior as the internal:makecommand in vim. We had this feature already for:GoBuildand:GoRun. But not for:GoInstall,:GoTest, etc.. Now all commands are unified. - Add autojump to error for
:GoInstall. - Add autowrite feature for
:GoInstall,:GoTestXXXfunctions and:GoVet - Support
git url.<base>.insteadOfand custom import paths of binaries. This improves the commands:GoInstallBinariesand:GoUpdateBinaries. - Add support for highlighting go templates with
*.tmplextensions. Based on the work from @cespare from https://github.com/cespare/vim-go-templates
BUG FIXES:
- Fix clearing the status bar when
:GoErrCheckis called - Fix godocNotFound to not match 'os' pkg contents. This improves the command
:GoDoc - Fix parsing and jumping to error locations when used Vim from a different directory than the current buffer's directory
- Fix completion showing duplicates paths for completion results, such as github.com/fatih/color and github.com/fatih/color/.
1.0.4 (Apr 28, 2015)
FEATURES:
- A new
:GoTestFunccommand (with appropriate mappings) is added. Run tests function which surrounds the current cursor location. Useful to test single tests. - Highlight all Go operators. Previously not all
operators were highlighted. As previously, to highlight options, enable it
with by setting
g:go_highlight_operatorsto 1 in your vimrc.
IMPROVEMENTS:
- Improved certain
:GoDocusages to show a better error message - Improved
:GoRenameto have a default value for rename input. Avoids retyping similar words. - Synced with latest Oracle version.
callgraphis removed. - Removed our custom referrers mode. New version of oracle now displays the matching lines.
BUG FIXES:
- Fixed the internal
executeInDirfunction which was failing when ignorelist was not set properly. - Fixed trailing slash for package completion with
:GoImport - Fixed paths in error list for Windows users.
- Fixed not showing "import cycle not allowed" error message when called
:GoBuildor:GoRun - Fixed users using vimproc requiring arguments to functions to be escaped.
- Fixed depth for test snippets
- Fixed neosnippet support loading snippet files the second time if necessary.
1.0.3 (Mar 7, 2015)
FEATURES:
- A new
:GoTestCompilecommand (with appropriate mappings) is added. Useful to compile a test binary or show/fix compile errors in quickfix window
IMPROVEMENTS:
referrermode is improved to show referring lines in the quickfix window- A new
errtsnippet is added, which expands toif err != nil { t.Fatal(err) } - A new
errhsnippet is added, useful to be used in ahttp.Handler - UltiSnips snippets are improved to take advance of Vim's
Visualmode. For example selecting a block and typingifwill create an if scope around the block. - Cleanup README.md
BUG FIXES:
- Fix trimming brackets if completion was invoked on a previous completion
- Fix Oracle scope settings. Added docs about usage.
- Fixed previously broken
varandvarssnippets - Fix duplicate docs
- Fix fallback binary path for Windows users. The fallback mechanism is used to discover the necessary Go tools, such as
godef,gocode, etc...
1.0.2 (Feb 17, 2015)
FEATURES:
- New snippets are added, mostly for testing ( changes)
IMPROVEMENTS:
- Enable all Oracle commands. Docs, mappings and commands are also added. It uses Quickfix list instead of a custom UI.
- Clarify installation process in Readme, add instructions for vim-plug, NeoBundle and manual.
BUG FIXES:
- Fix shiftwidth parsing, it was broken in the previous release for old Vim versions
- Fix experimantal mode
1.0.1 (Feb 9, 2015)
FEATURES:
- New feature to highlight build constraints (disabled by default)
IMPROVEMENTS:
- Updated godef import path
- Updated Readme for possible problems with
csh - Documentation for text objects are updated, typo fixes are merged
- If vimproc is installed, Windows users will use it for autocompletion
- Improve UltiSnips snippets to pick Visual selection (demo: http://quick.as/0dvigz5)
- Packages with extensions, like "gopkg.in/yaml.v2" can be now displayed
- Packages with different import paths, like "github.com/bitly/go-simplejson" can be now displayed
BUG FIXES:
- Fatal errors are now parsed successfully and populated to quickfix list
- Shiftwidth is changed to use shiftwidth() function. Fixes usage with plugins like vim-sleuth and possible mis usage (like setting shiftwidth to zero)
- Added a new Donation section to Readme, for those who ask for it.
- Fix parsing of errcheck error syntax
- Fix consistency between Neosnippet and UltiSnips snippets
1.0 (Dec 24, 2014)
We don't tag any changes or releases, so let's start with 1.0. Our Windows
support is now in a good shape, tons of bugs are fixed, many new features and
improvements is being added and it's getting better with each day (thanks to
the community contributions).
0.0 (Mar 24, 2014)
Initial commit: 78c5caa82c