diff --git a/cmd/micro/plugin.go b/cmd/micro/plugin.go index c06a00b4..f02f75df 100644 --- a/cmd/micro/plugin.go +++ b/cmd/micro/plugin.go @@ -142,8 +142,11 @@ func LoadPlugins() { } if _, err := os.Stat(configDir + "/init.lua"); err == nil { - if err := L.DoFile(configDir + "/init.lua"); err != nil { + pluginDef := "\nlocal P = {}\n" + "init" + " = P\nsetmetatable(" + "init" + ", {__index = _G})\nsetfenv(1, P)\n" + data, _ := ioutil.ReadFile(configDir + "/init.lua") + if err := L.DoString(pluginDef + string(data)); err != nil { TermMessage(err) } + loadedPlugins = append(loadedPlugins, "init") } } diff --git a/cmd/micro/runtime.go b/cmd/micro/runtime.go index 6c21696e..40c5ecea 100644 --- a/cmd/micro/runtime.go +++ b/cmd/micro/runtime.go @@ -412,7 +412,7 @@ func runtimeHelpOptionsMd() (*asset, error) { return a, nil } -var _runtimeHelpPluginsMd = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8c\x58\xdd\x8f\xdc\xb6\x11\x7f\xd7\x5f\x31\x48\x1e\x72\x67\xac\x75\x79\xde\x37\xdb\x75\x1c\xa7\xf1\x07\x70\x97\x02\x41\x51\x80\x23\x69\xb4\xa2\x8f\x22\x55\x0e\xb9\x6b\xb5\x68\xff\xf6\x62\x48\xea\x63\x7d\x97\xa0\x0f\x87\xd5\xad\xe6\x8b\x33\xbf\x99\xf9\x71\xbf\x87\xcf\x26\x9e\xb4\xe5\xaa\xfa\xa0\x5b\xef\x80\xe3\x34\x39\x1f\x18\x5a\x4f\x18\xb4\x3d\xc1\x94\x05\xe0\xa2\xc3\x00\x08\xac\xc7\xc9\x10\xfc\x1a\x11\x78\xe6\x40\x63\x0d\x6f\xcf\xe4\xe7\x22\x07\x03\x32\x60\x35\xa2\xb6\xc0\xad\xd7\x53\x80\xcb\xa0\xdb\x01\x34\x83\x8f\x16\x30\x00\x07\xf4\x21\x4e\xe5\x7b\x1e\x5c\x34\x1d\x34\x04\x93\xc1\x96\x3a\xd0\x16\x2a\xf5\xdf\xbb\xba\x75\xb6\xd7\xa7\xbb\x51\xc2\xba\x2b\x41\x94\xcf\x8f\x38\xd2\xee\xb1\x36\x11\x55\x5d\x55\x0f\x03\x79\x02\x94\x3f\xb0\x71\x6c\xc8\x83\xeb\xa1\x45\x63\x1a\x6c\x1f\xa1\x8f\xb6\x0d\xda\xc9\x51\x92\xe7\xd9\x45\x68\xd1\xe6\x93\x92\xf8\x9d\x5d\xf4\x55\x39\x47\x70\x29\xde\xd6\x75\x24\x41\x07\x3d\x12\x83\x0b\x03\x79\x08\x03\xda\xe5\x14\x35\x3c\x0c\x04\x16\x47\x49\x15\xb7\x03\x8d\x04\x9a\x2b\xe5\xec\xab\xe4\xec\xe6\xac\xe9\x72\xab\x6a\xf8\xc9\x79\xa0\xaf\x98\x92\x87\x6b\x2c\xd7\xc9\xa1\x94\x48\x71\x05\x61\x20\x88\x4c\x1e\x18\xcf\xc4\x95\xfc\xdb\xc4\xbe\x27\x0f\x97\x92\xaf\x63\x55\x29\xa5\x4c\xc4\x6a\x35\xe6\xec\x3d\x9e\x29\xbb\xac\x00\x00\xea\xba\x4e\x9f\x9e\x42\xf4\x16\x7a\x34\x4c\x15\xd9\x4e\x34\x53\xbe\x40\x89\xb0\x82\x33\x7a\x8d\x8d\x91\xd8\x01\xc1\x53\x4f\x9e\x6c\x4b\x92\x05\x71\x2d\x42\xe9\x01\xb3\x23\xcd\xd0\x90\x9c\x98\xbe\x52\x1b\x03\x75\xe0\x6c\x5d\x3d\x0c\x9a\x93\x01\x33\x3a\x0e\x80\xe6\x82\x33\x27\xb5\x36\x7a\x4f\x36\x24\x3b\x87\x6f\xd2\x7f\xa2\x90\xb1\xa5\xde\x44\xff\x37\x4d\x97\x9b\x5b\x05\xc8\x70\x21\x63\xea\xaa\x7a\x65\x0c\xe0\x19\xb5\x49\xe1\x61\xa9\xa0\x14\xd9\x68\x0e\x19\x2f\xe2\xe2\x91\xe6\x46\xdb\x4e\xdb\x13\x03\x53\xc9\x47\x9f\x5e\x0d\x64\xa6\x0c\x0f\xa6\x1d\x0a\x0a\xf2\xd0\xb0\x5b\x12\x84\xd0\x38\x67\x48\xca\x3b\x51\xab\xfb\x59\xce\x78\x19\xa8\x94\x3d\x27\xa2\xda\x20\xeb\xc9\xb8\x16\x25\x8a\x92\xa8\x36\x7a\x76\x1e\x9c\x07\xeb\x02\x60\x1f\x8a\xde\x96\xb7\xd6\x09\x04\x02\xd5\x55\xf5\xd1\x05\x29\xb4\xa0\x2b\x85\xb6\x20\x95\xc1\xb5\x6d\xf4\x4f\xd5\xa5\xb7\x1a\x22\xbb\x1a\xe9\x6a\x78\xdf\x4b\x26\xab\x0b\xda\x00\xb8\x81\xbd\xa1\xde\x79\xfa\xc6\xf7\x52\xad\x83\x40\x0b\xd4\xe4\xa9\x80\x54\x00\xfa\x5e\xf2\x28\x01\x22\x53\xc6\x5b\x49\x45\xce\x0d\x75\x25\x27\x9a\x78\x4d\x49\x39\xe7\xce\xcb\x96\x9b\xc5\x59\xb5\x1d\xc3\x44\xcc\x0d\xb5\xc4\xcf\x75\x55\xbd\x7c\xf9\xf2\x8f\x5a\x77\xab\x15\xda\x6e\xc5\x28\xe7\x9c\x25\xe1\x15\x18\xc1\x25\x40\x69\x5b\xb9\x4e\xbc\x39\xc0\xb6\x25\xce\xf0\xd3\xd6\xa6\xc6\xf1\x8f\x09\x1e\xae\x87\x34\x55\x6a\xf8\x59\xbc\x26\xc8\x0b\x98\xe0\x46\x84\xc3\x3c\x11\xb0\x3e\x59\x0c\xd1\x13\x57\xbd\xf3\xfb\x40\x3c\xc1\x49\x9f\xc9\x42\x64\x01\xc7\x3b\xf7\x03\x17\x95\x34\x0d\x6f\x8f\x55\xf5\x02\xd4\xa7\x7b\x75\xdc\x9a\x2a\x03\x5e\xd4\x72\x3c\x9f\xee\x73\x00\x09\x0f\xb9\x35\xcc\x2c\x13\xc0\x8a\x49\x67\x25\x90\xdc\x4a\x22\xcd\x38\x52\x85\x9c\x5d\xbd\xfb\xf4\xe9\x7e\x35\x7c\x00\x76\xa0\x3a\xf4\x17\x6d\xd5\x01\xd4\x45\xdb\xce\x5d\x58\x1e\x8d\xb6\xf1\xab\x3c\xf4\x9e\xa8\xe1\x4e\xd5\x75\x7d\x9b\x42\x0b\xd8\xb0\x3a\x2e\x47\x76\x3d\xa0\x31\xc9\x8f\xbc\xd8\x85\xa3\xe5\x88\x94\x54\xda\xe8\x1f\xb0\x51\xc7\x92\xcc\x8e\xbe\x2e\xad\xb5\x34\x76\xd2\x2d\x9d\x98\x9e\xc5\x78\xd2\x1d\x89\x99\xec\x89\xbc\x3a\x82\xa1\xc0\xa9\x4c\x4c\xb6\x03\x79\x83\x27\x49\x89\xdb\xc6\x9d\xf3\xcb\x3c\x9e\xbc\x1b\xa7\xc0\xc9\xc8\x3b\x0a\x9f\xa6\x84\x54\x8b\x23\x01\x07\xaf\xed\xe9\x56\x1d\x0b\x36\x73\x9e\xce\x68\x22\x2d\x81\x79\xfa\x67\xa4\x34\x1f\x5c\x52\x4c\x66\x5e\x75\xdd\x53\x33\x87\xa2\xa8\x6d\x20\xdf\x63\x4b\xff\xfe\x8f\x58\x66\x89\x55\x2c\xe5\x6a\x67\x2b\x79\x50\xad\xdf\xca\x6c\xcd\xca\x37\x6a\xa7\xae\x60\x24\x4c\xa0\x9d\x33\x34\xb4\x85\x77\xee\xb6\x4e\x31\xdc\xaf\x47\xc9\x26\x17\xf7\xdb\x99\x9e\xf7\xbc\x4c\x62\x11\x96\xa5\xa3\x65\x23\x1b\x23\x21\x30\xe5\x16\x2c\x92\x27\xe3\x1a\x34\x66\x3e\x40\xb4\x46\x5a\x40\x87\x82\x71\xd7\xa2\x01\x67\xcd\x5c\x44\xd7\x88\x7e\x95\x37\x7f\x12\xd6\x61\x59\x3e\x2f\x5e\xa7\xcf\x3f\x0b\x53\x22\xda\xca\x91\x7c\x66\x34\x6d\xb2\xd9\x58\xf6\xfe\x5a\xdb\xee\xaf\x34\xdf\x3c\xd2\x7c\x58\x87\xc8\x9a\x0b\x19\xe9\x0c\xea\x91\x66\x25\x19\x50\x59\x40\x65\xd5\x0f\xf8\x48\x6f\xdc\x38\xa2\xed\x52\x41\x0f\xdb\x5a\x5d\xc2\x2e\x83\x26\xb5\x6e\x5d\xd7\x6f\xd6\x7f\xc5\xb8\x44\x9a\xc1\x26\xd9\x69\xb3\xa5\xb2\x8b\xc4\x9e\x2a\x8d\x2b\x79\x4e\x93\x15\xd4\xe2\x40\x5e\x91\x5d\x67\x5c\xda\xb2\xbf\x31\xc1\x8f\x20\xe3\x62\xef\x35\xb8\xb4\xe1\x3e\xba\xcd\x77\x8e\x7e\xdb\x76\xd7\x30\xde\xef\xca\x24\xf8\x33\xda\xce\xac\x07\x6d\xc7\x6e\x8f\xff\x68\xf7\x45\x28\x67\xd8\xa9\xdd\x0f\x64\xcc\xa2\xcb\xe9\x9f\xd5\xc0\x21\x63\x5e\x72\x7a\xce\xe3\xfe\x19\x93\x49\x27\x65\x6a\x67\xfb\x17\xd7\xdc\x0b\xff\xd9\x45\x73\x10\xf6\x11\x3a\x17\x43\x79\x22\xef\xe5\xe9\xed\x57\x1d\x56\x11\x69\x71\xf4\xa7\x54\x8b\xf5\x10\x62\x3c\x59\xe3\x75\x04\x7e\xe3\x7e\xad\x4d\x41\x91\x6c\xb8\x93\x77\xd1\x76\x35\xa8\xc5\xad\x2a\x8f\xe4\xbd\x4a\xfb\x42\x65\xe7\x4a\xec\xcb\xd8\xde\xd6\x6b\x70\x69\x15\x7d\x4b\x08\x53\x9d\x9b\x2c\x48\x5d\xae\xf0\x16\xc9\x42\x3d\x06\x9c\xa6\xdc\xfa\xa5\x25\xb7\x68\x64\x66\xc9\xd2\x49\x70\x50\xcb\x61\x55\xf2\x9e\x76\xa4\x3f\xc5\x91\x6c\xb8\x72\x28\xe8\x98\x90\x79\x47\x22\x9e\x30\xd6\x35\xe9\x54\x10\xf0\x42\x90\x57\xbf\x19\xbb\x03\x74\x18\xf0\x6a\x7a\xd8\x0e\x96\x2f\xa4\xc0\xd9\x26\x87\x4e\xaf\x84\xe8\x8b\x6b\x96\x50\xb7\x72\xba\xe9\xda\xb2\x18\x7b\x94\x00\x51\xe4\xab\xcc\xee\x46\x9c\x81\x89\x46\x30\xfa\x51\x76\x35\x8f\xd2\x16\xeb\x26\x59\xd7\xf1\x96\xda\x26\x06\x60\x37\xae\x83\xd9\x35\x5f\xa8\x0d\x5c\xad\xac\xa2\x99\xd3\xf7\x9b\xc6\x80\x67\x82\x51\x86\xe7\x48\x61\x70\x1d\xd7\x57\xd4\x70\xe9\x15\xcc\xac\x34\xdb\xab\x72\x42\xd3\xe5\xa3\xac\x33\x7c\x9e\xec\xa3\x31\xd7\x64\x7c\xb3\x7d\x4c\xec\x39\x91\xe4\x5b\x55\x57\xbf\x17\x15\x26\x2a\x11\xee\x8e\x3a\x39\x66\xbd\x67\xa4\xcf\xd0\x50\xe1\x9d\x10\xdc\xa4\xdb\x3a\x71\xed\x85\x50\x39\xfb\x24\x48\x51\x69\xd3\x20\x7a\x86\x5a\x25\xda\xb4\x82\x37\x33\xac\x4a\xd8\x67\xb4\x35\xbc\x2f\x17\x02\x4f\xd2\x24\x52\xfc\x13\x59\xf2\x69\xe8\x72\xd0\xed\x63\xea\x27\x97\xb9\x7f\xc6\xf4\x88\xe9\x4b\x84\xf5\xaa\x53\xe1\xd9\xe9\x64\x23\x7a\x96\x61\x30\x79\xd7\x18\x1a\xf9\x90\xe6\xd9\x92\x2a\xdd\x97\x3c\xca\x28\xfc\x26\x6d\xc1\x47\xba\x55\x92\x06\x55\xae\x21\x92\xc3\x5f\x22\x87\x4c\x36\x9f\xcf\xb2\x10\x98\xc4\xe6\x74\x80\x8b\xb3\x3f\x84\x62\x7c\x35\x01\x78\x42\x2d\x13\xf3\x37\x5e\x06\xc3\xae\xec\x87\xb5\xae\x89\xc5\xef\x28\x5f\xd9\x57\xc8\xec\x5a\x9d\x18\x7a\x59\xdd\x58\x26\x6b\x33\x17\x06\xb7\x45\x56\xbf\x8e\xbd\x5a\xae\x27\x2b\x57\xd9\x19\x55\x3f\x69\x43\x0f\xf3\x44\x42\xac\x3e\x63\x18\xe4\x53\x6e\xa0\xc2\xae\xf2\x7d\x6a\xc5\x45\xc1\xee\x33\xf0\x2b\x7e\x93\xc1\x8d\x1d\x6d\x6c\x11\x3d\x1d\xaf\xa9\x53\xfd\x21\x53\xa5\x9b\x91\x4f\x32\x3a\xaf\xa8\xca\xb5\xe4\x5b\xef\x9d\xff\x3f\xe4\x7e\x27\xfe\xe8\x3e\x27\x8a\x75\x93\x99\xd6\x32\x43\xe0\x46\x70\x7a\x28\xfb\xe0\x5a\xeb\x4a\xe1\x00\x83\xe6\xe0\xfc\xfc\x90\xe8\xef\x93\x8d\x9b\xbe\xde\x6d\x5c\xb8\x59\xc9\x44\x36\x5d\xe5\xbb\x0b\x94\xbb\x0b\x07\xb4\x1d\xfa\x0e\x16\xf3\x5f\x56\xf0\xfc\x61\x04\xdf\x7d\x77\x80\x1f\xc5\xd4\xf7\xf0\x17\xea\x31\x9a\xb0\xfc\x5e\x51\x55\xbb\x26\x4f\x9c\xbf\xbc\x38\xac\x0d\xdd\x5d\x6b\x24\xd2\x1c\xc8\x4b\x51\x4f\x4e\x1d\xf2\x12\xc1\x18\x5c\x6b\x1c\x93\x4a\x4d\x3c\xa7\x61\x2e\xc7\xce\x57\xcf\xf4\xab\xc9\x0f\x0c\x27\x1d\x86\xd8\x80\xa7\xc9\xb1\x96\xa4\xc0\xdf\xe5\x4a\xf3\x8f\x9b\x21\x84\x89\x8f\x77\x77\x59\xa0\x6e\xdd\x78\xf7\xaf\x99\x3a\xdd\x69\x2c\xbf\x6d\x04\x4f\x74\x37\x22\x07\xf2\x77\x3e\x5a\xb9\xfe\x2f\xbf\x77\xdc\xd6\xd5\xff\x02\x00\x00\xff\xff\xc4\xe7\xe3\xc4\xa2\x11\x00\x00") +var _runtimeHelpPluginsMd = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8c\x58\x5f\x8f\xdc\xb6\x11\x7f\xd7\xa7\x18\x24\x0f\xd9\x33\xd6\xba\x3c\xdf\x9b\xed\x3a\x8e\xd3\xd8\x67\xe0\x2e\x05\x82\xa2\x00\x29\x69\xb4\xa2\x8f\x22\x55\x0e\xb9\x6b\xb5\x68\x3f\x7b\x31\x43\xea\xcf\xda\x97\xa0\x0f\x87\xd5\xad\x38\xff\x7f\x33\xf3\xe3\x7e\x0f\x9f\x6c\x3a\x19\x47\x55\xf5\xc1\xb4\xc1\x03\xa5\x69\xf2\x21\x12\xb4\x01\x75\x34\xee\x04\x53\x3e\x00\x17\x13\x07\xd0\x40\x66\x9c\x2c\xc2\xaf\x49\x03\xcd\x14\x71\xac\xe1\xed\x19\xc3\x5c\xce\xc1\xa0\x09\x74\x35\x6a\xe3\x80\xda\x60\xa6\x08\x97\xc1\xb4\x03\x18\x82\x90\x1c\xe8\x08\x14\x75\x88\x69\x2a\xdf\xd3\xe0\x93\xed\xa0\x41\x98\xac\x6e\xb1\x03\xe3\xa0\x52\xff\xbd\xad\x5b\xef\x7a\x73\xba\x1d\xd9\xad\xdb\xe2\x44\xf9\xfc\xa8\x47\xdc\x3d\xd6\x36\x69\x55\x57\xd5\xe3\x80\x01\x41\xf3\x1f\xb8\x34\x36\x18\xc0\xf7\xd0\x6a\x6b\x1b\xdd\x3e\x41\x9f\x5c\x1b\x8d\xe7\x50\xc4\xf2\xec\x13\xb4\xda\xe5\x48\x91\xed\xce\x3e\x85\xaa\xc4\x11\xbd\xf8\xdb\xfa\x0e\xd9\xe9\x68\x46\x24\xf0\x71\xc0\x00\x71\xd0\x6e\x89\xa2\x86\xc7\x01\xc1\xe9\x91\x53\x45\xed\x80\x23\x82\xa1\x4a\x79\xf7\x4a\x8c\x1d\xce\x06\x2f\x37\xaa\x86\x9f\x7c\x00\xfc\xa2\x25\x79\x7a\xf5\xe5\x3a\x39\x28\x89\x64\x53\x10\x07\x84\x44\x18\x80\xf4\x19\xa9\xe2\x7f\x9b\xd4\xf7\x18\xe0\x52\xf2\x75\x57\x55\x4a\x29\x9b\x74\xb5\x2a\xf3\xee\x41\x9f\x31\x9b\xac\x00\x00\xea\xba\x96\xcf\x80\x31\x05\x07\xbd\xb6\x84\x15\xba\x8e\x25\x25\x5f\xa0\xf8\xb0\x82\xb3\x0e\x46\x37\x96\x7d\x07\x0d\x01\x7b\x0c\xe8\x5a\xe4\x2c\xb0\x69\x3e\x24\x0f\x3a\x1b\x32\x04\x0d\x72\xc4\xf8\x05\xdb\x14\xb1\x03\xef\xea\xea\x71\x30\x24\x0a\xec\xe8\x29\x82\xb6\x17\x3d\x93\x88\xb5\x29\x04\x74\x51\xf4\x1c\xbf\x4a\xff\x09\x63\xc6\x96\x7a\x93\xc2\xdf\x0c\x5e\x0e\x37\x0a\x34\xc1\x05\xad\xad\xab\xea\x95\xb5\xa0\xcf\xda\x58\x71\x4f\x97\x0a\x72\x91\xad\xa1\x98\xf1\xc2\x26\x9e\x70\x6e\x8c\xeb\x8c\x3b\x11\x10\x96\x7c\xf4\xf2\x6a\x40\x3b\x65\x78\x10\xee\x50\x50\x90\xa7\x2d\xf9\x25\x41\x1a\x1a\xef\x2d\x72\x79\x27\x6c\x4d\x3f\x73\x8c\x97\x01\x4b\xd9\x73\x22\xaa\x0d\xb2\x01\xad\x6f\x35\x7b\x51\x12\xd5\xa6\x40\x3e\x80\x0f\xe0\x7c\x04\xdd\xc7\x22\xb7\xe5\xad\xf5\x0c\x81\x88\x75\x55\x7d\xf4\x91\x0b\xcd\xe8\x12\xd7\x16\xa4\x12\xf8\xb6\x4d\xe1\x5b\x71\xee\xad\x06\xd1\xad\x4a\xba\x1a\xde\xf7\x9c\xc9\xea\xa2\x5d\x04\xbd\x81\xbd\xc1\xde\x07\xfc\xca\xf6\x52\xad\x23\x43\x0b\xd4\x14\xb0\x80\x94\x01\xfa\x9e\xf3\xc8\x0e\x6a\xc2\x8c\xb7\x92\x8a\x9c\x1b\xec\x4a\x4e\x0c\xd2\x9a\x92\x12\xe7\xce\xca\x96\x9b\xc5\x58\xb5\x85\x61\x93\xce\x0d\xb5\xf8\x4f\x5c\x60\x97\xbb\x2a\x11\xf6\xc9\x6e\x11\x44\x0f\x4f\xce\x5f\x40\x37\x3e\xed\x86\x88\xe4\x75\x8b\x89\x3b\x8d\x41\x73\x3f\xe1\xd2\x6b\xdb\x59\xd6\x85\x1d\x7b\xeb\xb8\xb5\x78\x2c\xe0\x25\x83\xd9\x10\xf8\x09\x39\x2a\xed\x3a\x71\xce\xe1\xa5\x5a\x5e\x4d\x9a\x48\xa0\xc5\xed\x9d\x41\x5d\xdc\xeb\x7d\x00\xc2\x28\x93\x91\x6b\x6f\xc1\x4f\x19\x4e\x8d\x26\xe9\x03\x51\xd6\x1b\x8b\x71\x9e\xf0\x58\xf5\xbb\xbe\xe7\x3c\xb2\xa0\xef\x7b\x50\x51\x37\x14\x3d\x4d\xba\x45\x52\xe0\x9d\x9d\x45\xf9\x3b\x2f\xc2\x92\x63\xd1\x35\x0b\xd8\xb3\xb3\x75\x55\xbd\x7c\xf9\xf2\x8f\x26\xdd\x06\x6d\x8e\x69\x69\x69\xca\x10\x93\xc3\x6b\x1f\x45\x2f\xfd\x67\x5c\xe5\x3b\x2e\x8e\x07\xdd\xb6\x48\xb9\x5b\x8d\x73\x32\x67\xc2\x93\x74\x93\xef\x41\x86\x70\x0d\x3f\xb3\x55\x99\x10\xdc\x7b\x70\xe0\xc3\x1c\x25\x90\x39\x39\x1d\x53\x40\x92\x78\x77\x8e\x04\x84\x93\x39\xa3\x83\x44\x1c\xf9\x3b\xff\x03\x15\x11\x59\x1e\x37\x77\x55\xf5\x02\xd4\xfd\x83\xba\xdb\x66\x50\xae\x1f\x8b\x65\x7f\xee\x1f\xb2\x03\x52\xd2\x3c\x49\xec\xcc\x03\x33\x27\xd3\xb1\x23\xb9\x48\x7c\x9a\xf4\x88\x95\xa6\x6c\xea\xdd\xfd\xfd\xc3\xaa\xf8\x08\xe4\x41\x75\x3a\x5c\x8c\x53\x47\x50\x17\xe3\x3a\x7f\x21\x7e\xb4\xc6\xa5\x2f\xfc\xd0\x07\xc4\x86\x3a\x55\xd7\xf5\x8d\xb8\xc6\x65\x52\x77\x4b\xc8\xbe\x07\x6d\xad\xd8\xe1\x17\x3b\x77\x0c\x87\x88\x22\xd2\xa6\xf0\xa8\x1b\x75\x57\x92\xd9\xe1\x97\x65\x12\x2d\x73\x50\x64\xcb\xe0\x92\x67\x56\x2e\xb2\x23\x12\xa1\x3b\x61\x50\x77\x60\x31\x92\x94\x89\xd0\x75\xc0\x6f\xf4\x89\x53\xe2\xb7\xed\xe0\xc3\xb2\xbe\xa6\xe0\xc7\x29\x92\x28\x79\x87\xf1\x5e\x50\x79\x70\x7a\x44\xa0\x18\x8c\x3b\xdd\xa8\xbb\xd2\xca\x39\x4f\x67\x6d\x13\x2e\x8e\x05\xfc\x67\x42\x19\xa7\x19\xce\xa2\xe6\x55\xd7\x7d\xab\xe6\x58\x04\x8d\x8b\x18\x7a\xdd\xe2\xbf\xff\xc3\x9a\x89\x7d\x65\x4d\xb9\xda\x59\x4b\x9e\xeb\xeb\xb7\xbc\x8a\xb2\xf0\x41\xed\xc4\x15\x8c\xa8\x05\xb4\x73\x86\x86\x71\xf0\xce\xdf\xd4\xe2\xc3\xc3\x1a\x4a\x56\xb9\x98\xdf\x62\x7a\xde\xf2\xb2\xb8\xf8\x70\x69\xe2\x8b\xb1\x96\x5d\x20\xcc\x13\xab\x9c\x3c\x59\xdf\x68\x6b\xe7\x23\x24\x67\xb9\x05\x4c\x2c\x18\xcf\xed\xcd\x8d\x99\x8f\xae\x1e\xfd\xca\x6f\xfe\xc4\xad\xe3\xb2\xab\x5f\xbc\x96\xcf\x3f\x73\x93\x3d\xda\xca\x21\x36\x33\x9a\xb6\xb3\x59\x59\xb6\xfe\xda\xb8\xee\xaf\x38\x1f\x9e\x70\x3e\xae\x33\x77\xcd\x05\x6f\x40\x02\xf5\x84\xb3\xe2\x0c\xa8\x7c\x40\x65\xd1\x0f\xfa\x09\xdf\xf8\x71\xd4\xae\x93\x82\x1e\x37\x16\xb2\xb8\x5d\xe6\xb2\xb4\x6e\x5d\xd7\x6f\xd6\x7f\x59\x39\x7b\x9a\xc1\xc6\xd9\x69\xb3\xa6\xb2\xba\x59\xdf\x32\x78\x39\xcf\x32\x7a\x41\x2d\x06\x54\x9e\x66\xcb\x4a\x10\x52\xf2\x1b\x21\xfc\x28\x23\x6f\x6f\x35\x7a\x21\x04\x1f\xfd\x66\x3b\x7b\xbf\x91\x83\x6b\x18\xef\xa9\x85\x1c\xfc\x59\xbb\xce\xae\x81\xb6\x63\xb7\xc7\x7f\x72\xfb\x22\x94\x18\x76\x62\x0f\x03\x5a\xbb\xc8\x92\xfc\xb3\x2a\x38\x66\xcc\x73\x4e\xcf\x79\x3b\x3e\xa3\x52\x64\x24\x53\x3b\xdd\xbf\xf8\xe6\x81\xe9\xe2\xce\x9b\x23\x93\xb5\xd8\xf9\x14\xcb\x13\x86\xc0\x4f\x6f\xbf\x98\xb8\x1e\xe1\x16\xd7\xe1\x24\xb5\x58\x83\x60\xe5\xa2\x8d\xd6\x11\xf8\x95\xf9\xb5\x36\x05\x45\xbc\x4e\x4f\xc1\x27\xd7\xd5\xa0\x16\xb3\xaa\x3c\x62\x08\x4a\xf6\x85\xca\xc6\x15\xeb\xe7\xb1\xbd\xb1\x91\xe8\x65\x73\x7f\xcd\x9f\xa5\xce\x0d\xee\xb7\xec\xce\x93\x85\xa9\x0d\x7a\x9a\x72\xeb\x97\x96\xdc\xbc\xe1\x99\xc5\x4b\x47\xe0\xa0\x96\x60\x95\x58\x17\x4a\x11\x4e\x69\x44\x17\xaf\x0c\x32\x3a\xca\x7a\x5e\x38\xd7\x37\x04\x7f\x4d\x3a\x16\x04\xbc\x60\xe4\xd5\x6f\xc6\xee\x08\x9d\x8e\xfa\x6a\x7a\xb8\x0e\x96\x2f\xb8\xc0\x59\x27\xc5\xce\xac\xfc\xf1\xb3\x6f\x16\x57\xb7\x72\xfa\xe9\x5a\x33\x2b\x7b\x62\x07\x35\x9f\xaf\x32\x19\x1e\xf5\x0c\x84\x38\x82\x35\x4f\xbc\xab\x69\xe4\xb6\x58\x37\xc9\xba\x8e\xb7\xd4\x36\x29\x02\xf9\x71\x1d\xcc\xbe\xf9\x8c\x6d\xa4\x6a\x25\x61\xcd\x9c\x09\xc6\x2a\x31\xe8\x33\xc2\xc8\xc3\x73\xc4\x38\xf8\x8e\xea\x2b\x26\xbd\xf4\x8a\xce\xbc\x27\xeb\xab\x72\x42\xe5\xae\x56\xd6\x99\x7e\xfe\x6e\xa4\xad\xbd\xbe\xbb\x6c\xba\xef\xe4\xb2\x21\x77\x8a\x1b\x55\x57\xbf\x17\x11\x42\x2c\x1e\xee\x42\x9d\x3c\x91\xd9\x13\xf8\x67\x58\x3b\xd3\x74\x88\x7e\x32\x6d\x2d\x57\x93\x85\x7f\x7a\xf7\x8d\x93\x2c\xd2\xca\x20\x7a\x86\x89\x0a\xcb\x5c\xc1\x9b\x09\x69\xc5\x64\x3d\xb9\x1a\xde\x97\xfb\x53\x40\x6e\x12\x2e\xfe\x09\x1d\x06\x19\xba\x14\x4d\xfb\x24\xfd\xe4\xf3\x55\x29\x63\x7a\xd4\xf2\xa5\x86\xf5\x66\x58\xe9\xb3\x37\xa2\x23\x05\xe2\x61\x30\x05\xdf\x58\x1c\xe9\x08\x7b\xba\x67\xfa\x92\x47\x1e\x85\x5f\xa5\x2d\x86\x84\x37\x8a\xd3\xa0\xca\xad\x8d\x73\xf8\x4b\xa2\x98\xb9\xf9\xf3\x59\x66\x02\x23\x6c\xce\x44\xb8\x78\xf7\x43\x2c\xca\x57\x15\xa0\x4f\xda\xf0\xc4\xfc\x8d\x96\xc1\xb0\x2b\xfb\x71\xad\xab\x5c\x7a\x76\x94\xaf\xec\x2b\x4d\xe4\x5b\x23\x17\x9a\xb2\xba\x75\x99\xac\xcd\x5c\x18\xdc\xe6\x59\xfd\x3a\xf5\x6a\xb9\xcd\xad\x5c\x65\xa7\x54\xfd\x64\x2c\x3e\xce\x13\x32\xb1\xfa\xa4\xe3\xc0\x9f\x7c\x61\x67\x76\x95\xaf\x9f\x2b\x2e\x0a\x76\x9f\x81\x5f\xb1\x2b\x0a\x37\x76\xb4\xb1\x45\x1d\xf0\xee\x9a\x3a\xd5\x1f\x32\x55\x3a\x8c\x74\xe2\xd1\x79\x45\x55\xae\x4f\xbe\x0d\xc1\x87\xff\xe3\xdc\xef\x48\x1f\xfd\x27\xa1\x58\x87\xcc\xb4\x96\x19\x02\x07\xc6\xe9\xb1\xec\x83\x6b\xa9\x2b\x81\x23\x0c\x86\xa2\x0f\xf3\xa3\xd0\xdf\x6f\x36\xae\x7c\xbd\xdb\xb8\x70\x58\xc9\x44\x56\x5d\xe5\xab\x1e\x94\xab\x1e\x45\xed\x3a\x1d\x3a\x58\xd4\x7f\x5e\xc1\xf3\x87\x1e\x7c\xf7\xdd\x11\x7e\x64\x55\xdf\xc3\x5f\xb0\xd7\xc9\xc6\xe5\xe7\x9d\xaa\xda\x35\xb9\x70\xfe\xf2\xe2\xb8\x36\x74\x77\x2d\x21\xa4\x39\x62\xe0\xa2\x9e\xbc\x3a\xe6\x25\xa2\x53\xf4\xad\xf5\x84\x4a\x9a\x38\x5f\x5e\x38\xec\x7c\x53\x97\x1f\x99\x7e\x20\x38\x99\x38\xa4\x06\x02\x4e\x9e\x0c\x27\x05\xfe\xce\x57\x9a\x7f\x1c\x86\x18\x27\xba\xbb\xbd\xcd\x07\xea\xd6\x8f\xb7\xff\x9a\xb1\x33\x9d\xd1\xe5\xa7\xa0\x18\x10\x6f\x47\x4d\x11\xc3\x6d\x48\x2e\x9a\xf5\xb7\x20\xba\xa9\xab\xff\x05\x00\x00\xff\xff\xe1\x9d\x04\x43\xd1\x12\x00\x00") func runtimeHelpPluginsMdBytes() ([]byte, error) { return bindataRead( @@ -427,7 +427,7 @@ func runtimeHelpPluginsMd() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "runtime/help/plugins.md", size: 4514, mode: os.FileMode(420), modTime: time.Unix(1472160229, 0)} + info := bindataFileInfo{name: "runtime/help/plugins.md", size: 4817, mode: os.FileMode(420), modTime: time.Unix(1472160579, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/runtime/help/plugins.md b/runtime/help/plugins.md index 051c33c3..7d54c5d0 100644 --- a/runtime/help/plugins.md +++ b/runtime/help/plugins.md @@ -29,6 +29,11 @@ want a callback before the action is executed, use `preAction()`. In this case the boolean returned specifies whether or not the action should be executed after the lua code completes. +Another useful callback to know about which is not a action is +`onViewOpen(view)` which is called whenever a new view is opened and the new +view is passed in. This is useful for setting local options based on the filetype, +for example turning off `tabstospaces` only for Go files when they are opened. + --- There are a number of functions and variables that are available to you in