some additions to the plugin API

Those changes were originally used for the snippet plugin which
may not be part of the core.
This commit is contained in:
Florian Sundermann
2016-09-19 13:23:47 +02:00
parent d41f0bb324
commit 6fe20fb305
4 changed files with 32 additions and 2 deletions

View File

@@ -43,12 +43,20 @@ for functions are given using Go's type system):
* `OS`: variable which gives the OS micro is currently running on (this is the same
as Go's GOOS variable, so `darwin`, `windows`, `linux`, `freebsd`...)
* `configDir`: contains the path to the micro configuration files
* `tabs`: a list of all the tabs currently in use
* `curTab`: the index of the current tabs in the tabs list
* `messenger`: lets you send messages to the user or create prompts
* `RuneStr(r rune) string`: returns a string containing the given rune
* `Loc(x, y int) Loc`: returns a new `Loc` struct
* `JoinPaths(dir... string) string` combines multiple directories to a full path
* `GetOption(name string)`: returns the value of the requested option
* `AddOption(name string, value interface{})`: sets the given option with the given