mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-16 05:47:06 +09:00
Add new plugin runtime function
This commit is contained in:
@@ -326,6 +326,7 @@ func main() {
|
|||||||
L.SetGlobal("ReadRuntimeFile", luar.New(L, PluginReadRuntimeFile))
|
L.SetGlobal("ReadRuntimeFile", luar.New(L, PluginReadRuntimeFile))
|
||||||
L.SetGlobal("ListRuntimeFiles", luar.New(L, PluginListRuntimeFiles))
|
L.SetGlobal("ListRuntimeFiles", luar.New(L, PluginListRuntimeFiles))
|
||||||
L.SetGlobal("AddRuntimeFile", luar.New(L, PluginAddRuntimeFile))
|
L.SetGlobal("AddRuntimeFile", luar.New(L, PluginAddRuntimeFile))
|
||||||
|
L.SetGlobal("AddRuntimeFilesFromDirectory", luar.New(L, PluginAddRuntimeFilesFromDirectory))
|
||||||
|
|
||||||
jobs = make(chan JobFunction, 100)
|
jobs = make(chan JobFunction, 100)
|
||||||
events = make(chan tcell.Event, 100)
|
events = make(chan tcell.Event, 100)
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -127,6 +127,9 @@ called `test`, you would create the `test.md` file for example, and runt the fun
|
|||||||
AddRuntimeFile("test", "help", "test.md")
|
AddRuntimeFile("test", "help", "test.md")
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Use `AddRuntimeFilesFromDirectory(name, type, dir, pattern)` to add a number of files
|
||||||
|
to the runtime.
|
||||||
|
|
||||||
# Autocomplete command arguments
|
# Autocomplete command arguments
|
||||||
|
|
||||||
See this example to learn how to use `MakeCompletion` and `MakeCommand`
|
See this example to learn how to use `MakeCompletion` and `MakeCommand`
|
||||||
|
|||||||
Reference in New Issue
Block a user