Features 4 - WhoIsSethDaniel/goldsmith.nvim GitHub Wiki

Struct Tag Editing

The following screencast shows how struct tags can be edited using Goldsmith. First the user visually selects two structures and enters the command ":GoAddTags". This adds the default 'json' tags to both structs. Then, within the first struct, the user enters ":GoAddTag xml" which adds XML tags to the first struct. The user then navigates to the second struct and enters ":GoClearTags" which will clear all tags for the surrounding struct. The user navigates back to the first struct and enters ":GoRemoveTags json" which removes the JSON tags for that struct.

Goldsmith struct tag editing example

Create Interface Implementation Stubs

The following screencast shows how Goldsmith can help with implementing an interface. The user enters ":GoImpl" and uses tab-completion to find the correct package and then the interface within that package.

Goldsmith interface implementation example

Using :GoBuild and :GoRun

The following screencast shows the usage of the builtin :GoRun and :GoBuild. The user first does a plain :GoRun, the program runs and the user sees the output in the terminal. The user runs the program again, but this time passing an argument to the program. Again, the output is shown. Finally, the user runs :GoBuild which detects the user has a Makefile and runs that.

Goldsmith gorun and gobuild example

GO TO PAGE 5 --->