mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-17 14:27:12 +09:00
Some plugin helpers
This commit is contained in:
@@ -66,11 +66,22 @@ func Import(pkg string) *lua.LTable {
|
||||
return importErrors()
|
||||
case "time":
|
||||
return importTime()
|
||||
case "micro/plugin":
|
||||
return importMicroPlugin()
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func importMicroPlugin() *lua.LTable {
|
||||
pkg := L.NewTable()
|
||||
|
||||
L.SetField(pkg, "RegisterCallback", luar.New(L, (*Plugin).RegisterCallback))
|
||||
L.SetField(pkg, "GetPlugin", luar.New(L, GetPlugin))
|
||||
|
||||
return pkg
|
||||
}
|
||||
|
||||
func importFmt() *lua.LTable {
|
||||
pkg := L.NewTable()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user