Refactor Library/Std into subfolders for APIs, Infrastructure, Editor, Widgets, etc. Add more documentation and descriptions. Update references throughout website and docs.
531 B
531 B
APIs to create Slash Commands. For simple cases it is recommended to use Library/Std/Infrastructure/Slash Templates instead.
slashCommand.define(spec)
Define a custom slash command.
Supported keys in the spec:
name: name of the commanddescription: Description of the commandrun: The callback function that will be invoked once the command is run.
Example:
slashCommand.define {
name = "hello-world",
run = function()
editor.insertAtCursor("Hello |^| world!", false, true)
end
}