turbo-editors/turbo-golopublic Fork 0
v1.0.0
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.

📦 Turbo Golo d710c1b · on v1.0.0 · k33g · 12h ago
tools.toml.tmpl · 109 lines · 3.7 KBCheetah Blame HistoryRaw
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
# turbo-golo tools.
#
# Each [[tool]] becomes one line of the Golo menu, in the order they appear
# here. name is what the menu shows; a letter between tildes is its hot key, and
# no two tools should claim the same one.
#
# command goes to "sh -c", so pipes, globs and && work: one entry can be a
# whole sequence.
#
# menu says which menu it appears in. Leave it out and the tool goes into the
# Golo menu; name anything else and that menu is created for you, in the order
# the names first appear here. A tool that has nothing to do with Golo belongs
# in one of your own:
#
#   [[tool]]
#   name = "~E~cho"
#   command = "echo TADA"
#   menu = "Tools"
#
# A {{label}} in a command is a value the editor asks for before running it, in
# a box titled after the tool. The text between the braces is what it asks for:
#
#   [[tool]]
#   name = "~R~un"
#   command = "golo {{script}}"
#
# The value is quoted, so a path with a space in it stays one argument. Add ...
# inside the braces when you mean several arguments rather than one value:
#
#   [[tool]]
#   name = "Run with ~a~rguments"
#   command = "golo main.golo {{arguments...}}"
#
# Double braces, not single. Single ones appear in real commands — awk '{print
# $1}' and find . -exec rm {} + are both ordinary things to put here — and
# neither is asking you for anything.
#
# output says where what the command prints goes:
#   popup     a dialog that fills in as it runs, and says the exit code (default)
#   terminal  a terminal window, for anything that reads the keyboard or runs long
#   editor    an editing window once it has finished, to search with Ctrl-F
#
# Commands run in the directory the editor was started in, which is why they
# see the whole project when you start from its root. Golo has no project
# manifest: a script is a file, and every command here names the file it
# works on.

[[tool]]
name = "~R~un"
# The interpreter, on the file you name. A terminal, not a popup: a script that
# reads the keyboard has to be able to be answered, and one that runs long has
# to be able to be interrupted.
command = "golo {{script, e.g. main.golo}}"
output = "terminal"

[[tool]]
name = "~T~est"
# Every *_test.golo under the current directory, with gololang.Testing.
command = "golo --test"
output = "popup"

[[tool]]
name = "Test ~o~ne"
command = "golo --test {{test file or directory}}"
output = "popup"

[[tool]]
name = "~D~ebug"
# The same interpreter with its step debugger on. It reads the keyboard, so it
# needs a terminal.
command = "golo --debug {{script, e.g. main.golo}}"
output = "terminal"

[[tool]]
name = "R~E~PL"
# golo with no file starts its read-eval-print loop.
command = "golo"
output = "terminal"

[[tool]]
name = "~N~ew script"
# Writes a starter program from GoloScript's own template.
command = "golo new main --module {{module name, e.g. hello.World}} --name {{file name without .golo}}"
output = "popup"

[[tool]]
name = "~B~uild native"
# gogolo transpiles the script to Go and compiles it to a native executable.
# It needs the Go toolchain on PATH.
command = "gogolo build -o {{output executable}} {{script, e.g. main.golo}}"
output = "popup"

[[tool]]
name = "Build ~w~asm"
# wagolo transpiles the script to Go and compiles it to WebAssembly with
# TinyGo. wasi is the target a runtime such as wasmtime or Node runs; js and
# wasip2 are the others.
command = "wagolo build -target={{target: wasi, js or wasip2}} -o {{output .wasm}} {{script, e.g. main.golo}}"
output = "popup"

# A tool naming a `menu` gets a menu of its own on the bar. Nothing above does,
# so every tool above is in the Golo menu. This one is in a menu called Tools,
# which appears between Golo and Help — that is the whole mechanism.

[[tool]]
name = "~E~cho"
command = "echo 🎉 tada!"
menu = "Tools"
output = "terminal"