summaryrefslogtreecommitdiff
path: root/.config/micro/plug/go/help/go-plugin.md
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@simplelittledream.com>2022-07-16 18:13:16 -0400
committerJacob McDonnell <jacob@simplelittledream.com>2022-07-16 18:13:16 -0400
commit8fad9a5ecddc88d57a531e4b0084544984f23d25 (patch)
tree84954bc8219942aa56bc899330ccd0007bbe0ef0 /.config/micro/plug/go/help/go-plugin.md
parent2887af7fcfb4d618dd13cf66ec2fbdbd84c7527c (diff)
Added profile and other missing configs
Diffstat (limited to '.config/micro/plug/go/help/go-plugin.md')
-rw-r--r--.config/micro/plug/go/help/go-plugin.md42
1 files changed, 42 insertions, 0 deletions
diff --git a/.config/micro/plug/go/help/go-plugin.md b/.config/micro/plug/go/help/go-plugin.md
new file mode 100644
index 0000000..a4cdb33
--- /dev/null
+++ b/.config/micro/plug/go/help/go-plugin.md
@@ -0,0 +1,42 @@
+# Go Plugin
+
+The go plugin provides some extra niceties for using micro with
+the Go programming language. The main thing this plugin does is
+run `gofmt` and `goimports` for you automatically. If you would also
+like automatically error linting, check out the `linter` plugin.
+The plugin also provides `gorename` functionality.
+
+You can run
+
+```
+> gofmt
+```
+
+or
+
+```
+> goimports
+```
+
+To automatically run these when you save the file, use the following
+options:
+
+* `gofmt`: run gofmt on file saved. Default value: `on`
+* `goimports`: run goimports on file saved. Default value: `off`
+
+To use `gorename`, place your cursor over the variable you would like
+to rename and enter the command `> gorename newName`.
+
+You also press F6 (the default binding) to open a prompt to rename. You
+can rebind this in your `bindings.json` file with the action `go.gorename`.
+
+The go plugin also provides an interface for using `gorename` if you have
+it installed. The gorename command behaves in two ways:
+
+* With one argument: `> gorename newname` will rename the identifier
+ under the cursor with the new name `newname`.
+
+* With two arguments: `> gorename oldname newname` will rename the old
+ identifier with the new one. This uses gorename's syntax for specifying
+ the old identifier, so please see `gorename --help` for the details
+ for how to specify the variable.