summaryrefslogtreecommitdiff
path: root/plugins/golang/templates
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2015-09-19 09:06:16 -0700
committerRobby Russell <robby@planetargon.com>2015-09-19 09:06:16 -0700
commit2dc980c8c03fe31eccda6c646c4866956cfee3ac (patch)
tree5c86f4ffc1f047baaff17e5564413b58d86c39b8 /plugins/golang/templates
parent51677da85f98fb8003ea915edbef138df2f577b7 (diff)
parent22287d0153047cf5d5872d294202d9ce35e8eac8 (diff)
downloadzsh-2dc980c8c03fe31eccda6c646c4866956cfee3ac.tar.gz
zsh-2dc980c8c03fe31eccda6c646c4866956cfee3ac.tar.bz2
zsh-2dc980c8c03fe31eccda6c646c4866956cfee3ac.zip
Merge pull request #4331 from icholy/master
golang: improve go doc completion
Diffstat (limited to 'plugins/golang/templates')
-rw-r--r--plugins/golang/templates/package.txt29
-rw-r--r--plugins/golang/templates/search.txt0
2 files changed, 29 insertions, 0 deletions
diff --git a/plugins/golang/templates/package.txt b/plugins/golang/templates/package.txt
new file mode 100644
index 000000000..2b75cce35
--- /dev/null
+++ b/plugins/golang/templates/package.txt
@@ -0,0 +1,29 @@
+{{with .PDoc}}{{/*
+
+Constants
+---------------------------------------
+
+*/}}{{with .Consts}}{{range .}}{{range .Names}}{{.}} {{end}}{{end}}{{end}}{{/*
+
+Variables
+---------------------------------------
+
+*/}}{{with .Vars}}{{range .}}{{range .Names}}{{.}} {{end}}{{end}}{{end}}{{/*
+
+Functions
+---------------------------------------
+
+*/}}{{with .Funcs}}{{range .}}{{ .Name }} {{end}}{{end}}{{/*
+
+Types
+---------------------------------------
+
+*/}}{{with .Types}}{{range .}}{{ $TypeName := .Name }}{{ $TypeName }} {{/*
+
+*/}}{{range .Methods}}{{ $TypeName }}.{{.Name}} {{end}}{{/*
+
+*/}}{{range .Funcs}}{{.Name}} {{end}}{{/*
+
+*/}}{{range .Consts}}{{range .Names}}{{.}} {{end}}{{end}}{{/*
+
+*/}}{{range .Vars}}{{range .Names}}{{.}} {{end}}{{end}}{{end}}{{end}}{{end}}
diff --git a/plugins/golang/templates/search.txt b/plugins/golang/templates/search.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/plugins/golang/templates/search.txt