Skip to content

Releases: fatih/vim-go

v1.6

25 Apr 14:54
Compare
Choose a tag to compare

Please checkout our new changelog: https://github.com/fatih/vim-go/blob/master/CHANGELOG.md#16-april-25-2016

Also happy to announce that I'm a dad now! I have a little son and it's a joy to spend time with him 👶🏼 🤗

v1.5

16 Mar 22:21
Compare
Choose a tag to compare

Changes:

  • Feature (NEW): 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 functions
    • if and af are improved and implement from scratch. It has now
      support for literal functions, comments of functions, better cursor
      position support and more stable.
    • New :GoDecls and :GoDeclsDir commands that are available if
      ctrlp.vim is 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
  • Feature (NEW): A new :GoAlternate command 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)
  • Feature (NEW): Now commands can choose whether they want to open a
    quickfix or a location list via the setting g: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)
  • Commands: add support for goimport's new -srcdir. Goimports now
    succesfully suports vendor/ folders with this release. (gh-735)
  • Commands: add g:go_gorename_prefill setting which disabled pre filling the argument for :GoRename (gh-711)
  • Commands: improve :GoRun to complete to filenames (gh-742)
  • Commands: fix oracle scope not working if trailing slash exists in scope (gh-751)
  • Commands: fix :GoErrCheck checking abspath (gh-671)
  • Commands: fix :GoInstall correctly parsing errors (gh-692)
  • Commands: fix :GoInstall correctly parsing errors (gh-692)
  • Commands: fix :GoTestFunc for neovim (gh-695)
  • Commands: fix :GoRun accepting arguments for neovim (gh-730)
  • Commands: fix go run mappings not working (gh-542)
  • Internal: improved internal usage of retrieving offsets (gh-762)
  • Internal: improve by substitute all backslashes to slashes for filename (gh-703)
  • Internal: fix autodetect gopath picking up non existing GB vendor folder
  • Internal: fix gofmt errors showing per buffer instead of per script (gh-721)
  • Internal: improve internal Go package path function (gh-702)
  • Internal: improved typo and grammar errors in docs (gh-714)
  • Internal: improved internal :GoInfo automatic call (gh-759)
  • Snippet: fix some of the neosnippet snippets
  • Syntax(NEW): highlight //go:generate comment directives (gh-757)
  • Syntax: Indent code in Go HTML templates (gh-709)
  • Syntax: improve negative numbers of all types, octals, imaginary numbers
    with exponents (gh-752)

Thanks again to all contributors working on Vim-go.

P.s: You love vim-go? Now you can support vim-go by being a patron

v1.4

19 Jan 03:29
Compare
Choose a tag to compare

Changes:

  • Feature (NEW): 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 go command. This will be used in the future for all upcoming subcommands of the go tool.
    • :GoBuild is 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 show FAILED.
    • :GoRun opens a new vertical terminal emulator inside Neovim and runs the command there. The terminal mode can be changed with g:go_term_mode, which is by default vsplit. Current options are vsplit, split or tab. We also have three new mappings to open :GoRun command in different terminal split modes: <Plug>(go-run-vertical), <Plug>(go-run-split) and <Plug>(go-run-tab)
    • :GoTest, :GoTestFunc and :GoTestCompile opens and runs in a new terminal. The view mode (split,vertical, tab) is defined with g:go_term_mode. The g:go_term_enabled setting can be use to change the behavior of :GoTestXXX commands .If set to 1, it opens the test commands inside a terminal, if not it runs them in background just like :GoBuild and displays the result in the statusline.
    • We have two settings for terminal sizes: g:go_term_height and g: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.
  • Feature (NEW): Instead of quickfix window, vim-go now uses the location list feature 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: :GoBuild with errors that needs to be fixed, :GoLint with warnings that we want to check, :GoReferrers with a list of referred identifiers) (gh-626)
  • Feature (NEW): a new :AsmFmt command which is integrated to work with asmfmt (gh-673)
  • Feature (NEW): the full identifier information of a completed identifier is echoed in statusline. This is very useful to see a function signatures arguments. (gh-685)
  • Commands: improve :GoFmt by checking if the binary is indeed installed on the system (gh-617)
  • Commands: fix :GoFmt changing the fileformat of the current buffer (gh-615)
  • Commands: improve :GoMetaLinter by adding the option to run the metalinter on save and adding the option to limit the output to the currently active buffer. Set let g:go_metalinter_autosave = 1 to enable autosave and use let g:go_metalinter_autosave_enabled = ['vet', 'golint'] to change your options. (gh-631)
  • Commands: improved :GoDef. If vimproc is installed godef will make use of it (gh-670)
  • Internal: improve completion of godoce when vimproc is used (gh-620)
  • Internal: improve internal error matching prodecure to not match false positives (gh-618)
  • Commands: fix :GoRename to output the original error if parsing fails (gh-675)
  • Commands: fix :GoTest to output the original error if parsing fails (gh-676)
  • Syntax (NEW): a new option to highlight interface variables with go_highlight_interfaces (gh-681)
  • Syntax: fixed fmt.Fprintln not to highlight as builtin (gh-628)
  • Syntax: fixed wrong highlighting of channels of channels (gh-678)

Thanks to all contributors working on Vim-go.

v1.3

22 Nov 10:07
Compare
Choose a tag to compare

Changes:

  • Commands (NEW): a new :GoOracleTags command was added to pass build tags to Oracle's -tags flag. (gh-573)
  • Commands: change :GoTest command 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 option g:go_test_timeout. (gh-578)
  • Commands: improve :GoRename to collect and populate quickfix window with errors. (gh-577)
  • Commands: improve :GoRun by dropping bad filenames from quickfix window. This allows us to have only valid entries which can be jumped to (gh-547)
  • Commands: improve :GoMetaLinter quickfix output by using absolute paths. This enables us to jump to errors for all cases. (gh-565)
  • Commands: improve :GoMetaLinter command by adding a new option g:go_metalinter_deadline which cancels the linters after 5 seconds (previous default). (gh-576)
  • Commands: improve :GoMetaLinter by jumping to the first encountered error from the quickfix window.
  • Commands: fixed :GoErrCheck showing the correct output when executed inside the source folder (gh-564)
  • Commands: fixed :GoBuild by not using /dev/null anymore for build output (not supported by go). We pass a temporary file now. (gh-567)
  • Commands: fixed :GoFmt passing g:go_fmt_options options to goimports. This option is only valid with gofmt. (gh-590)
  • Internal (NEW): automatically resize quickfix window based on the number of errors (gh-602)
  • Internal: fix vim-go for cygwin users. (gh-575)
  • Syntax (NEW): improve build constraints to show invalid cases (such as // +buildfoo, not having an empty line between the package statement, etc..). Also add missing GOARCH values sucha s arm64. There are many other useful improvements, for more detail please have a look at (gh-589)
  • Syntax: fixed identifier in template files to be highlighted correctly (gh-559)
  • Syntax: fixed character region in template files to be highlighted correctly (gh-603)
  • Syntax: fixed variables in template files to be highlighted correctly (gh-611)
  • Syntax: add support for all values of GOARCH (gh-601)
  • Syntax: do not treat builtins as keywords. Now make will not highlighted but make() will be highlighted (gh-605)
  • Documentation: Add note about Syntastic usage as this problem comes up a lot (gh-580)
  • Documentation: Add note about :GoUpdateBinaries (gh-606)

Thanks to all contributors working on Vim-go.

v1.2

02 Oct 23:29
Compare
Choose a tag to compare

Changes:

  • Commands (NEW): a new :GoMetaLinter command which invokes gometalinter. Please check the PR #553 for more detail on customizing and usage of :GoMetaLinter.
  • Commands: Improve :GoImport to trim spaces when including import paths of form "fmt "
  • Commands: Fixed :GoRun to display errors when g:go_dispatch_enabled was enabled
  • Commands: Fixed :GoDrop displaying "Not enough arguments" (regression)
  • Commands: Fixed :GoErrCheck not showing PASS message if the command was successful
  • Commands: Fixed :GoErrCheck not executing in the directory of the currently edited file
  • Commands: Close quickfix window after a successful second round of :GoInstall
  • Internal: Avoid setting filetype twice. Previously it was doing it twice, which was expensive
  • Internal: Improve handling of GOPATH's with trailing / characters, such as /home/user/go/
  • Oracle: Escape files passed to oracle command. This could lead to some serious things.
  • Oracle: Clear g:go_oracle_scope when the scope was reseted. Previously it was set to empty string, which was causing false positives.
  • Oracle: Fix passing files rather than packages to certain oracle commands.
  • Syntax (NEW): add a new g:go_highlight_string_spellcheck feature, which is enabled by feature. Now if spell is enabled, go strings are also checked.
  • Documentation: Correct various misspellings.
  • Documentation: Specify our limited but functional gb support

Thanks to all contributors working on Vim-go.

v1.1

25 Jul 15:12
Compare
Choose a tag to compare

Changes:

  • Commands (NEW): a new :GoGenerate command is now available which can be used to invoke go generate within vim
  • Commands: improved :GoFmt command, which now uses the -w flag to write to the source code directly, instead of outputting it to stdout. This makes :GoFmt much more faster than the current implementation. This is one of the big changes in this release, so feedback is welcome!
  • Commands: improve commands GoRun, GoTest{,Func,Compile}, GoCoverage, GoGenerate, GoErrcheck, GoLint, and GoVet to handle multiple arguments. Previously this feature was limited to only certain commands. What this means is, for example :GoVet . -all will invoke go tool vet . -all automatically instead of plan go vet. This is one of the big changes in this release, so give it a try :)
  • Commands: improve :GoImport to have a ! feature. Now when when called with a ! appended it will go get it. i.e: :GoImport! github.com/fatih/color. Useful if :GoImport fails and you want to download it.
  • Commands: automatic GOPATH detections can now detect gb vendored folders. Some commands should now work without any problem when invoked on a gb project.
  • Commands: all command arguments are now properly escaped for shell invocation.
  • Commands: added the -f flag to :GoInstallBinaries command to support git url.<base>.insteadOf configuration
  • Commands: fix:GoDef for files containing spaces. We know escape the files before passing to :GoDef
  • Commands: fix :GoFmt not picking up the correct GOPATH when the fmt command was set to goimports
  • Documentation: fix and simplify README.md, add Wiki reference
  • Syntax improve width and precision highlighting, such as %s %5s %-5s %5.5f %.5f
  • License: 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.
  • Integration: fixed tagbar integration to show correct imports.
  • Oracle: show an error if a region is not selected when :GoFreeVars is called

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).

Also I want to thank for all contributors working on Vim-go. I truly appreciate it, because they help me to implement and fix all these feature and fixes. So please visit the contributors page and thank each of them :)

v1.0.5

26 May 10:08
Compare
Choose a tag to compare

Changes:

  • Commands: Improve :GoFmt (gofmt and goimports) speed. Now it's 2x faster than the previous implementation.
  • Commands: A new :GoOracleScope is 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. :GoOracleScope also supports completion of import paths, so it's very fast and handy to use. :GoOracleScope "" clears the current custom scope.
  • Commands: A new :GoPath command that displays the current GOPATH. A path can be passed to change the GOPATH (i.e :GoPath ~/foo/src). :GoPath "" clears and resets the GOPATH to the initial value.
  • Commands: A new "autodetect GOPATH" feature is added. This automatically detects if the project is using godep or is under a src root directory which is not in GOPATH and changes/modifies the GOPATH so 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 :GoDef will jump to the source code inside Godeps. This is enabled by default, but can disabled with let g:go_autodetect_gopath = 0. This new feature is also the foundation for other tools such as gb or wgo.
  • Commands: add Dispatch support for :GoBuild and :GoRun. For more info about dispatch see https://github.com/tpope/vim-dispatch . By default it's disabled, to enable it add let g:go_dispatch_enabled = 1 to your vimrc.
  • Commands: Add support for the bang ! attribute for all go tool commands. What this does it, if :GoBuild is called it will jump to the error. But :GoBuild! will not jump to any error. This has the same behavior as the internal :make command in vim. We had this feature already for :GoBuild and :GoRun. But not for :GoInstall, :GoTest, etc.. Now all commands are unified.
  • Commands: Add autojump to error for :GoInstall.
  • Commands: Add autowrite feature for :GoInstall, :GoTestXXX functions and :GoVet
  • Commands: Fix clearing the status bar when :GoErrCheck is called
  • Commands: Fix godocNotFound to not match 'os' pkg contents. This improves the command :GoDoc
  • Commands: fix parsing and jumping to error locations when used Vim from a different directory than the current buffer's directory
  • Commands: support git url..insteadOf and custom import paths of binaries. This improves the commands :GoInstallBinaries and :GoUpdateBinaries.
  • Docs: improvements and fixes
  • Completion: Fix completion showing duplicates paths for completion results, such as github.com/fatih/color and github.com/fatih/color/.
  • Syntax: Add support for highlighting go templates with *.tmpl extensions. Based on the work from @cespare from https://github.com/cespare/vim-go-templates

Thanks for all contributors working on Vim-go.

v1.0.4

28 Apr 19:25
Compare
Choose a tag to compare

Changes:

  • Commands (new feature): A new :GoTestFunc command (with appropriate mappings) is added. Run tests function which surrounds the current cursor location. Useful to test single tests.
  • Commands: Improved certain :GoDoc usages to show a better error message
  • Commands: Improved :GoRename to have a default value for rename input. Avoids retyping similar words.
  • Commands: Fixed the internal executeInDir function which was failing when ignorelist was not set properly.
  • Commands: Fixed trailing slash for package completion with :GoImport
  • Commands: Fixed paths in error list for Windows users.
  • Commands: Fixed not showing "import cycle not allowed" error message when called :GoBuild or :GoRun
  • Completion: Fixed users using vimproc requiring arguments to functions to be escaped.
  • Oracle: Synced with latest Oracle version. callgraph is removed.
  • Oracle: Removed our custom referrers mode. New version of oracle now displays the matching lines.
  • Documentation: Improve README.md
  • Syntax (new feature): Highlight all Go operators. Previously not all operators were highlighted. As previously, to highlight options, enable it with by setting g:go_highlight_operators to 1 in your vimrc.
  • Snippets: Fixed depth for test snippets
  • Snippets: Fixed neosnippet support loading snippet files the second time if necessary.

Many thanks and appreciations for all contributors working on Vim-go. Without them, vim-go wouldn't be here in this form.

v1.0.3

07 Mar 17:03
Compare
Choose a tag to compare

Changes:

  • Commands: a new :GoTestCompile command (with appropriate mappings) is added. Useful to compile a test binary or show/fix compile errors in quickfix window
  • Autocompletion: fix trimming brackets if completion was invoked on a previous completion
  • Oracle: fix Oracle scope settings. Added docs about usage.
  • Oracle: referrer mode is improved to show referring lines in the quickfix window
  • Snippets: fixed previously broken var and vars snippets
  • Snippets: a new errt snippet is added, which expands to if err != nil { t.Fatal(err) }
  • Snippets: a new errh snippet is added, useful to be used in a http.Handler
  • Snippets: UltiSnips snippets are improved to take advance of Vim's Visual mode. For example selecting a block and typing if will create an if scope around the block.
  • Documentation: fix duplicate docs
  • Vim-go: cleanup README.md
  • Vim-go: fix fallback binary path for Windows users. The fallback mechanism is used to discover the necessary Go tools, such as godef, gocode, etc...

Thanks for all contributors working on Vim-go.

v1.0.2

17 Feb 12:06
Compare
Choose a tag to compare

Changes:

  • Oracle: enable all Oracle commands. Docs, mappings and commands are also added. It uses Quickfix list instead of a custom UI.
  • Vim-go: clarify installation process in Readme, add instructions for vim-plug, NeoBundle and manual.
  • Vim-go: fix shiftwidth parsing, it was broken in the previous release for old Vim versions
  • GoFmt: fix experimantal mode
  • Snippets: new snippets are added, mostly for testing ( changes)

Thanks for all contributors working on Vim-go