turbo-editors/turbo-golopublic Fork 0
main
Commits
Clone
git clone https://git.rickub.com/turbo-editors/turbo-golo.git
git clone ssh://git@rickub.com/turbo-editors/turbo-golo.git

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

tools.toml.tmpl · 109 lines · 3.7 KBCheetah Blame HistoryRaw
📦 Turbo Golo d710c1b k33g 15h ago1# turbo-golo tools.
2#
3# Each [[tool]] becomes one line of the Golo menu, in the order they appear
4# here. name is what the menu shows; a letter between tildes is its hot key, and
5# no 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
11# Golo menu; name anything else and that menu is created for you, in the order
12# the names first appear here. A tool that has nothing to do with Golo belongs
13# in one 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 = "~R~un"
25# command = "golo {{script}}"
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 = "Run with ~a~rguments"
32# command = "golo main.golo {{arguments...}}"
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 they
44# see the whole project when you start from its root. Golo has no project
45# manifest: a script is a file, and every command here names the file it
46# works on.
47
48[[tool]]
49name = "~R~un"
50# The interpreter, on the file you name. A terminal, not a popup: a script that
51# reads the keyboard has to be able to be answered, and one that runs long has
52# to be able to be interrupted.
53command = "golo {{script, e.g. main.golo}}"
54output = "terminal"
55
56[[tool]]
57name = "~T~est"
58# Every *_test.golo under the current directory, with gololang.Testing.
59command = "golo --test"
60output = "popup"
61
62[[tool]]
63name = "Test ~o~ne"
64command = "golo --test {{test file or directory}}"
65output = "popup"
66
67[[tool]]
68name = "~D~ebug"
69# The same interpreter with its step debugger on. It reads the keyboard, so it
70# needs a terminal.
71command = "golo --debug {{script, e.g. main.golo}}"
72output = "terminal"
73
74[[tool]]
75name = "R~E~PL"
76# golo with no file starts its read-eval-print loop.
77command = "golo"
78output = "terminal"
79
80[[tool]]
81name = "~N~ew script"
82# Writes a starter program from GoloScript's own template.
83command = "golo new main --module {{module name, e.g. hello.World}} --name {{file name without .golo}}"
84output = "popup"
85
86[[tool]]
87name = "~B~uild native"
88# gogolo transpiles the script to Go and compiles it to a native executable.
89# It needs the Go toolchain on PATH.
90command = "gogolo build -o {{output executable}} {{script, e.g. main.golo}}"
91output = "popup"
92
93[[tool]]
94name = "Build ~w~asm"
95# wagolo transpiles the script to Go and compiles it to WebAssembly with
96# TinyGo. wasi is the target a runtime such as wasmtime or Node runs; js and
97# wasip2 are the others.
98command = "wagolo build -target={{target: wasi, js or wasip2}} -o {{output .wasm}} {{script, e.g. main.golo}}"
99output = "popup"
100
101# A tool naming a `menu` gets a menu of its own on the bar. Nothing above does,
102# so every tool above is in the Golo menu. This one is in a menu called Tools,
103# which appears between Golo and Help — that is the whole mechanism.
104
105[[tool]]
106name = "~E~cho"
107command = "echo 🎉 tada!"
108menu = "Tools"
109output = "terminal"