Features 2 - WhoIsSethDaniel/goldsmith.nvim GitHub Wiki

Symbol Highlighting

The following shows Goldsmith's ability to highlight the symbol underneath the cursor. This can be turned on by default, but for this demo it is turned off until the user enters ":GoSymHighlightOn" and you see that, as the user moves around, the symbol under the cursor is highlighted throughout the code. When the user enters ":GoSymHighlightOff" the symbol highlighting is turned off.

Goldsmith symbol highlighting

Documentation and Help

The following shows Goldsmith's :GoDoc and :GoHelp commands. First the user enters ":GoDoc" and uses tab-completion to find the "io" package and then uses tab-completion to find the "ReadFull" method. A window appears with the documentation for io.ReadFull. The user then enters ":GoHelp" and uses tab-completion to find the "environment" topic. The help window changes to show the help page about the environment.

Goldsmith help and documentation

Manual goimports Support

The following demonstrates the use of the ":GoImports" command. If you don't want to have goimports run on save you can always run it manually using this command. In the screencast the user types some code that uses the http package. The user then runs the ":GoImports" command and net/http is added to the imports list. The user removes the code, runs ":GoImports" and net/http is removed from the imports list.

Goldsmith manual goimports example

GO TO PAGE 3 --->