turbo-editors/turbo-gopublic Fork 0
v1.0.1
Commits
Clone
git clone https://git.rickub.com/turbo-editors/turbo-go.git
git clone ssh://git@rickub.com/turbo-editors/turbo-go.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

tools.toml.tmpl · 94 lines · 2.9 KBCheetah Blame HistoryRaw
📦 Turbo Go 3d7798b k33g 13h ago1# turbo-go tools.
2#
3# Each [[tool]] becomes one line of the Go menu, in the order they appear here.
4# name is what the menu shows; a letter between tildes is its hot key, and no
5# two tools should claim the same one.
6#
7# command goes to "sh -c", so pipes, globs and && work: one entry can be a
8# whole sequence.
9#
10# menu says which menu it appears in. Leave it out and the tool goes into the Go
11# menu; name anything else and that menu is created for you, in the order the
12# names first appear here. A tool that has nothing to do with Go belongs in one
13# of your own:
14#
15# [[tool]]
16# name = "~E~cho"
17# command = "echo TADA"
18# menu = "Tools"
19#
20# A {{label}} in a command is a value the editor asks for before running it, in
21# a box titled after the tool. The text between the braces is what it asks for:
22#
23# [[tool]]
24# name = "~I~nit module"
25# command = "go mod init {{module path}}"
26#
27# The value is quoted, so a path with a space in it stays one argument. Add ...
28# inside the braces when you mean several arguments rather than one value:
29#
30# [[tool]]
31# name = "Test ~o~ne"
32# command = "go test {{extra flags...}} ./..."
33#
34# Double braces, not single. Single ones appear in real commands — awk '{print
35# $1}' and find . -exec rm {} + are both ordinary things to put here — and
36# neither is asking you for anything.
37#
38# output says where what the command prints goes:
39# popup a dialog that fills in as it runs, and says the exit code (default)
40# terminal a terminal window, for anything that reads the keyboard or runs long
41# editor an editing window once it has finished, to search with Ctrl-F
42#
43# Commands run in the directory the editor was started in, which is why ./...
44# means the whole module when you start from the project root.
45
46[[tool]]
47name = "~F~ormat"
48command = "gofmt -l -w ."
49output = "popup"
50
51[[tool]]
52name = "~L~int"
53command = "go vet ./..."
54output = "popup"
55
56[[tool]]
57name = "~B~uild"
58command = "go build ./..."
59output = "popup"
60
61[[tool]]
62name = "~T~est"
63command = "go test ./..."
64output = "popup"
65
66[[tool]]
67name = "~R~un"
68command = "go run ."
69# A terminal, not a popup: a program that reads the keyboard has to be able to
70# be answered, and one that runs long has to be able to be interrupted.
71output = "terminal"
72
73# A tool that asks for a value: {{double braces}} opens a box before it runs,
74# and what you type is shell-quoted, so a name with a space stays one argument.
75
76[[tool]]
77name = "~G~rep"
78command = "grep -rn {{pattern}} --include='*.go' ."
79output = "editor"
80
81[[tool]]
82name = "~I~nit module"
83command = "go mod init {{module path}}"
84output = "popup"
85
86# A tool naming a `menu` gets a menu of its own on the bar. Nothing here does,
87# so every tool below is in the Go menu. Add `menu = "Doc~k~er"` to one and a
88# Docker menu appears between Go and Help — that is the whole mechanism.
89
90[[tool]]
91name = "~E~cho"
92command = "echo 🎉 tada!"
93menu = "Tools"
94output = "terminal"