Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EditorCommand ¶
Defines an editor command and completion.
The completion function is called every keystroke after the user invokes the completion keybind ( TAB ). The function returns plausible suggestions based of the current input ( as a string ) or an empty string if the user hasn't provided any arguments.
Examples:
{ Name = "HelloWorld", Description= "Puts a friendly message in the console", } { Name = "ComplexCommand", Description = "A really, really complicated command", Completion = function (arguments) print(arguments) -- string, e.g. hello world return response end }
type PluginMeta ¶
type PluginMeta struct { // Plugin details Name string Version string Description string Homepage string Source string // Plugin "Actions" Hooks map[string]lua.LFunction Commands []EditorCommand }
Defines a plugin's details and actions.
func LoadPlugin ¶
func LoadPlugin(name string) (*PluginMeta, error)
Loads a plugin by name from micropad plugin directory
Click to show internal directories.
Click to hide internal directories.