From b9cbd73dca1cfc97cade76d875ef416033a814e1 Mon Sep 17 00:00:00 2001 From: Camille Scholtz Date: Wed, 11 Oct 2017 19:15:52 +0200 Subject: [PATCH 1/2] Add formatter plugin --- cmd/micro/runtime.go | 27 ++++++++++++++++++++- runtime/plugins/formatter/formatter.lua | 31 +++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 runtime/plugins/formatter/formatter.lua diff --git a/cmd/micro/runtime.go b/cmd/micro/runtime.go index 5c142ad842..637ac7b1d3 100644 --- a/cmd/micro/runtime.go +++ b/cmd/micro/runtime.go @@ -46,6 +46,7 @@ // runtime/plugins/autoclose/utf8/LICENSE // runtime/plugins/autoclose/utf8/README.md // runtime/plugins/autoclose/utf8/utf8.lua +// runtime/plugins/formatter/formatter.lua // runtime/plugins/ftoptions/ftoptions.lua // runtime/plugins/linter/linter.lua // runtime/plugins/literate/README.md @@ -1150,6 +1151,26 @@ func runtimePluginsAutocloseUtf8Utf8Lua() (*asset, error) { return a, nil } +var _runtimePluginsFormatterFormatterLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\x92\xcb\x6a\xf3\x30\x10\x85\xf7\x7e\x8a\x41\x2b\xfb\x27\x11\xff\x3a\xe0\x45\x1b\x48\x57\x25\xa5\x2d\xdd\x16\x11\x8d\x22\x51\x79\x64\x74\x89\xe9\xdb\x17\x59\x4e\x9c\xf4\x42\x88\xc1\x1b\xe9\xe8\x3b\x33\x73\xc6\x28\x78\xc0\xb8\xed\xa3\x71\x54\x33\xe5\x7c\x27\x62\x44\xcf\x1a\x68\x5b\x20\x63\x21\x6a\xa4\x0a\x00\xe0\x4e\xca\x9f\xb2\x05\x28\x61\x03\x36\x15\x92\xac\xaa\x47\xf1\x81\x6b\xd7\x75\x82\xe4\x51\xc4\x16\x30\xcb\xb9\x4f\xb4\x39\x7b\xfb\xbf\xa9\x2a\x95\x68\x97\xa9\x70\x7e\x57\x37\xa3\xe5\x3a\xf9\x37\x83\x43\xdd\xac\x5e\xc4\x01\xeb\xc9\x6a\xbc\xb2\x6e\x27\x2c\xa8\x08\xed\xac\xe2\xf7\x49\xad\x36\xc6\xe2\xeb\x67\x8f\x13\xa2\xe8\xb4\x20\x69\x71\x3c\x30\x6a\x7c\xd5\x02\xdb\x3b\x36\x77\x97\xbf\xa2\x82\x16\x8c\xe3\xbd\xeb\x91\x6a\xb6\x77\xaa\x8b\xb0\x0c\xb0\x1c\x80\x01\xe7\x97\x66\xfc\x49\x44\x5d\x7c\xd0\x06\x9c\xd1\xca\x04\x7d\x1d\x9e\x55\xef\x86\x24\x52\xbc\x91\x1f\x34\x5a\x7b\xdd\x20\xe8\x1b\xaa\x3f\x81\x3c\xc6\xe4\x0b\x37\xa7\x3a\x4f\xd1\x63\x48\x36\x4f\xbc\x58\xad\x3c\x0a\x59\xb3\x7f\x82\x15\xc8\x74\xba\xb3\x2e\xe4\xe9\x7f\x4b\xf0\x19\xb7\xb9\xa6\x69\x53\x4e\xa9\x3b\x1a\xa3\x3d\x18\x1c\x9a\x63\x3e\x7f\x2c\xe4\x45\xb7\xbf\x6c\x4b\x06\xe7\xff\x2b\x00\x00\xff\xff\x47\xe2\x8c\xbd\xd3\x02\x00\x00") + +func runtimePluginsFormatterFormatterLuaBytes() ([]byte, error) { + return bindataRead( + _runtimePluginsFormatterFormatterLua, + "runtime/plugins/formatter/formatter.lua", + ) +} + +func runtimePluginsFormatterFormatterLua() (*asset, error) { + bytes, err := runtimePluginsFormatterFormatterLuaBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "runtime/plugins/formatter/formatter.lua", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + var _runtimePluginsFtoptionsFtoptionsLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\x90\xb1\x4e\x03\x31\x0c\x86\xf7\x3c\x85\xe5\xa9\x27\xa1\x0e\x30\xdf\x00\x0b\x63\x87\x4a\x2c\x88\x21\xdc\xd9\xad\x45\x6a\x47\x17\x1f\xd5\xbd\x3d\xca\x9d\x8e\x16\x55\x0c\xcd\xe4\x7c\x71\xfe\x2f\x8e\x30\xbc\x92\xef\xb2\x8b\xe9\x06\xd9\x6d\xae\x0a\x36\xd0\xb6\xa0\x92\xc0\x8f\xa4\x01\x00\xe0\xb9\xef\x6f\xdb\x1e\xc0\x87\x91\x9a\x40\xda\x87\xc0\xa3\x76\x15\x83\xe9\x9b\xd0\x79\x97\x49\x37\xdf\x42\xe7\x66\xbe\x2f\x0c\x6a\xfe\x9f\xed\x57\x53\xd7\x40\x3e\x0e\xcb\x76\x0e\xae\x45\xb2\x2e\x26\x60\x87\x16\x6a\xe6\xf6\x65\xe4\xed\x9e\xdc\x45\x0f\xe5\x1d\x59\x12\xf9\x94\x09\x3f\xc2\x2a\xab\xad\x2d\xe0\x29\x7e\x51\x3d\x45\xb0\x61\x65\x07\xc3\xbf\xc2\xfd\xe5\x51\x1e\x3f\x8b\x5b\xc9\xb1\xa3\x3a\x1e\x1a\x33\x2e\x03\x50\x2a\x74\xc9\xcd\x93\x1f\x4d\xaf\x53\x17\xf2\x78\x8b\x9e\xae\xd1\x14\x4f\xe9\x0e\xbb\xae\x72\xed\xe7\x4f\xfe\x09\x00\x00\xff\xff\xbe\x08\x7b\x2b\xb0\x01\x00\x00") func runtimePluginsFtoptionsFtoptionsLuaBytes() ([]byte, error) { @@ -1170,7 +1191,7 @@ func runtimePluginsFtoptionsFtoptionsLua() (*asset, error) { return a, nil } -var _runtimePluginsLinterLinterLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x56\x6d\x8b\xe3\x36\x10\xfe\xbc\xf9\x15\x83\xa8\xc1\xde\xd8\xbe\xf6\xe8\xa7\x80\x29\xd7\x6d\xef\xa0\xdc\x4b\xe1\xae\xed\x87\x6e\xaf\x28\xd6\x38\xd1\xad\x2c\x19\x49\xce\x0b\xe1\xfe\x7b\x91\xe4\x38\xb6\xe3\xdd\x6e\xe9\xc2\x46\xb2\x34\x9a\xe7\x99\x17\x8d\x86\x57\xf0\x06\xed\x87\xc6\x72\x25\x63\x22\xb8\xb4\xa8\x49\x02\x45\x01\x92\x0b\xb0\x5b\x94\x0b\x00\x80\x57\x8c\x4d\x64\x52\xb0\xba\xc5\x64\x81\x92\x2d\x16\xef\xe8\x03\xde\xa9\xba\xa6\x92\x05\x01\x92\x42\x27\x98\xbb\xa1\xdb\x23\x29\x7c\x9b\x2c\x16\x55\x2b\x4b\xa7\x0b\x06\x5b\x71\xe2\x71\xee\x5a\xfd\x3b\xc7\x7d\x9c\xac\x3e\xd2\x1d\xc6\x15\x15\x06\xc3\x8e\x6e\xe5\x5b\xaf\x30\xee\x30\x7b\x2d\xc3\x1d\x27\x29\x54\x49\x05\x54\x16\x8a\x8b\xba\xfc\xc7\xb6\x5a\xbd\xe6\x02\x3f\x1d\x1b\x1c\xcb\x71\x81\x53\xc9\xfc\x57\x6a\xb7\x03\x19\xc6\x35\x14\xf0\x13\xd7\x58\x5a\xa5\x8f\xef\x69\x8d\xb1\x3b\x17\xf4\xf0\x0a\x3e\x7c\x74\x1e\x23\x7b\x2e\x99\xda\x1b\x72\xf1\x9b\xfb\x63\xb8\x93\xad\x10\x50\x00\x79\xff\xdb\x5b\xe2\xd7\x51\x18\xf4\x93\x9b\xc1\xee\x0b\x86\xbb\x17\xee\xa3\x93\x91\xec\xac\xdf\x19\x53\x00\xd9\xa8\x89\x6a\xe7\xc0\x98\x6c\xd4\xba\xe5\xc2\x79\xd7\x49\xa4\x70\x22\xfd\x77\xe6\xbe\x3b\x88\xaf\x29\x90\xa8\x5a\x45\x62\x05\x51\x4d\x92\x2b\x25\xe7\xb8\xf5\xb3\x93\xb3\xf1\x72\x2a\x62\xcb\xc1\x49\x67\xc1\x85\x99\x68\xe9\x2c\x35\xd1\xd2\x72\x8b\xe5\x83\xcf\x87\xcb\xfc\x44\xb2\x4c\xaa\xac\x54\x42\xb9\x4c\x7a\x3e\x4e\x73\xb4\x5b\x25\x67\xa1\x9a\x63\x25\xe8\x03\x1a\x07\x35\x98\x4f\x8c\xc8\xb3\xd5\x0f\x73\xe6\xd7\xc7\xe6\xe8\x4e\x76\xe3\xe4\xd4\xdc\x89\xe6\x78\x76\x58\x3f\x73\x66\xa9\xd6\x36\xad\xcd\x2a\xa5\x6b\x6a\x8b\x86\x6a\x83\x74\x2d\xd0\x07\x23\xd3\xd8\x28\x6d\x4d\x21\xd5\x95\xd5\x8f\x59\x5c\xce\x87\xbc\x2c\x7d\xa8\xfc\x70\x22\x59\x65\x8e\xd2\xd2\x43\xa6\xa4\xf0\x66\x64\x7f\x50\x21\xc2\x04\x0f\x56\xd3\x59\x27\xe7\x67\x3f\xdf\x5c\x81\x2e\x97\x63\xd8\xe7\xa0\x92\xcc\x58\x56\x94\xcb\xe5\x77\xdf\xff\x67\x0a\x37\x37\x33\xa6\x9b\x3d\xaf\x2c\x01\x2a\xd9\xf9\x82\x31\xaa\xf7\xbc\x0b\x3f\x4c\x5c\x62\xf6\xdc\x56\x9e\xdf\xa1\xd4\xad\xf4\x0c\xbd\x86\xf2\x69\xe3\x9f\x83\x2b\xb8\x6c\x0f\xff\x06\xdb\x83\xcd\xdc\x9b\x27\xd0\x3e\xac\xbf\x60\x69\xf9\x0e\xb3\xbb\xd9\x50\x97\x82\xca\xcd\xd8\xac\x7e\xe9\x7f\xc6\xfd\x9a\x0c\x9b\xa5\xc0\x6a\x5f\x4c\xc2\x70\x22\xe1\xde\x16\xaa\xaa\x42\x89\xc9\xfc\xb0\x0f\xbf\xdc\x0f\x63\x9f\x47\x71\x24\xa2\xe4\x29\xdc\x2f\x74\x37\x5f\x40\xdc\x86\xf7\xee\x79\x72\x22\x99\x63\xc1\xb8\xbe\xba\x41\xa8\xb5\xd2\x4f\x42\x98\x52\xf3\xc6\xce\x03\x99\x6d\x77\x9d\xfb\xd9\x30\x8e\x4e\x0a\x21\x12\x69\xbe\x4c\x1f\x43\x90\xbc\x9e\x55\xed\xd6\x53\xe8\x86\x13\xe9\x0b\x62\x96\x09\x6e\xec\xeb\x56\x08\xf7\xde\x98\xb0\x64\x2c\x53\xad\x0d\x73\xc7\xc3\xac\x82\x9f\x2f\x5c\xf2\x48\xa4\x10\xb1\x65\x7e\xc5\xc3\x58\xcd\xe5\x26\xaf\xa9\x2d\xb7\x71\x65\xfd\x1b\x6c\x51\x53\x8b\x24\x99\xad\xce\xe7\xdd\x20\xd9\x05\xf7\x3a\x67\xe6\xcd\x3d\xd2\x5a\xcc\xda\xeb\x37\xd2\x20\x30\xa8\x8c\xa1\x24\xfa\x82\x49\xb5\xe9\x8a\xe2\x5c\x76\x0e\xec\x92\x6c\xf2\xd8\x2b\xe9\x1b\x83\x1d\xc7\x7d\xff\xfa\xce\x35\x30\x23\x5a\xd3\x0e\xa1\x7f\x7d\xc7\x2d\xc7\x9d\x40\xaa\x5f\x09\xf1\xa6\xb5\x16\xf5\x3b\x34\x86\x6e\xd0\xc4\x8f\x51\xf1\xc6\x06\xc0\x14\xca\x9a\xa5\x40\xf5\xc6\xa4\x21\x0d\x83\xb1\xd3\xa6\xc6\x23\x4c\xd4\x07\x0d\xc9\xc2\x8b\xfe\xa2\xd6\x1f\x1b\xba\x97\xf1\x40\x1f\x21\xdd\x7f\xd7\x50\x29\xf9\xf3\xc1\x07\xeb\x8c\x3d\x02\x9c\xba\xcb\xc9\xc6\xe1\x51\x7a\xe4\xc4\xa5\xcf\x71\x39\x6e\xa0\x00\xd3\x88\xc1\x21\x72\x2f\x49\x47\x2f\x88\x69\xdc\xe0\x01\x8a\xa1\x96\xd5\xc6\xb4\xeb\x98\x44\x91\x2f\x09\x71\x9e\x67\x09\x49\xfa\x45\x9f\x0d\x71\xc4\x96\xc3\xc5\x3a\x48\xba\x35\xaf\xbb\x52\x1a\xfe\x4e\xfd\x35\xe3\x12\x78\x43\xb9\xf6\xce\x41\x93\x00\x53\x7d\xb8\xb2\x0c\x3e\x69\x5e\xc3\x7e\xcb\x2d\x9a\x86\x96\x38\xcc\x3e\xd7\xca\xb9\x61\x15\xee\x00\xf9\x1c\x99\x5b\x87\x11\x99\xdb\x6f\x06\x2f\xf8\xe5\xae\x54\x5c\x32\x8f\x92\x06\xb3\x26\x99\x03\xa3\x3e\xd1\x3b\x10\x53\xa8\xcd\xc6\x79\x69\x78\xdb\x86\x2a\x46\xa7\x79\x05\x6b\x6a\x50\xba\x9e\xf1\xba\xc9\xf4\x9d\x76\xbf\xef\x7b\xca\x6b\x02\xe3\x1c\x1a\xa5\x4f\x9f\x7f\x56\xc9\xb6\x5e\xa3\xf6\x44\x12\x4f\x31\x85\x97\x63\x2a\xe7\x86\x72\x38\xbf\x4e\xeb\x10\x7c\x63\x75\x0a\x06\x9b\x64\x14\x77\xd3\x0a\xd7\x56\x9f\xbe\xce\x64\x43\x4c\xe2\x3f\x3f\x47\xe6\x2f\x1f\xe4\x90\x15\x71\xaf\xc0\x05\x17\x69\xb9\x75\xa1\x35\x56\xaf\x36\xc1\x6b\x9d\xcb\x07\xe1\xb5\xae\x2e\xe4\x5c\x1a\xd4\x36\x0e\x80\xa9\x3f\x99\x8c\x7a\x62\x8d\xb6\xd5\xb2\x63\x34\x31\x60\xec\xce\x01\x53\x83\x8d\x6f\xb3\xc9\xb3\xda\xf6\x4e\xfa\xfe\x7e\xdc\x8d\x07\x55\x4e\xff\x25\x05\x7c\x4a\x87\x04\x21\x71\x7e\x4b\x20\xcf\xfd\xf1\x3c\x07\x92\xc4\xf9\x6d\xe2\x52\x3d\x7a\xd9\x25\x60\xc7\xdd\xa9\xf0\xcc\xff\x09\x00\x00\xff\xff\x26\x00\xad\xc4\x83\x0d\x00\x00") +var _runtimePluginsLinterLinterLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x57\xdb\x8e\xdb\x36\x13\xbe\xf7\x53\x0c\x88\x5f\x80\xb4\x96\x94\xbf\x41\xaf\x0c\x08\x45\xba\x6d\x02\x14\x39\x14\xd8\xb4\xbd\xe8\x36\x05\x2d\x8d\x6c\x66\x29\x52\x20\x29\x1f\x60\xe4\xdd\x0b\x92\xb2\x2c\xc9\xf4\xf6\x80\x2c\xb0\xcb\x11\x39\x9c\xef\x9b\x03\xc9\x59\x56\xc3\x1b\x34\x1f\x5a\xc3\xa4\x88\x09\x67\xc2\xa0\x22\x09\x14\x05\x08\xc6\xc1\x6c\x51\x2c\x00\x00\x5e\x55\xd5\x4c\x27\x05\xa3\x3a\x4c\x16\x28\xaa\xc5\xe2\x1d\x7d\xc2\x7b\xd9\x34\x54\x54\x5e\x81\xa4\xd0\x2b\xe6\x76\xe8\xd7\x48\x0a\xff\x4f\x16\x8b\xba\x13\xa5\xb5\x05\xa3\xa5\x38\x71\x38\xf7\x9d\xfa\x95\xe1\x3e\x4e\x56\x0f\x74\x87\x71\x4d\xb9\x46\xbf\xa2\x3a\xf1\xd6\x19\x8c\x7b\xcc\xc1\xca\x78\xc5\x6a\x72\x59\x52\x0e\xb5\x81\xe2\x62\x2e\xff\xbe\xab\x57\xaf\x19\xc7\x8f\xc7\x16\xa7\x7a\x8c\xe3\x5c\x33\xff\x99\x9a\xed\x48\xa7\x62\x0a\x0a\xf8\x81\x29\x2c\x8d\x54\xc7\xf7\xb4\xc1\xd8\xee\xf3\x76\x58\x0d\x1f\x1e\x6c\xc4\xc8\x9e\x89\x4a\xee\x35\xb9\xc4\xcd\xfe\x54\xb8\x13\x1d\xe7\x50\x00\x79\xff\xcb\x5b\xe2\xe6\x91\x6b\x0c\x29\xbc\xa8\x70\xf7\xc2\x7e\xf4\x6a\xd6\xd1\x1e\xc3\x3a\x54\x00\x29\x67\xd6\x6d\x0c\x63\xb2\x29\x4b\x1b\x72\x3f\x9c\x48\x56\xeb\xa3\x30\xf4\x90\x49\xc1\x8f\x76\x21\xfb\x8d\x72\xee\x05\x3c\x18\x45\x49\xea\x1c\xff\x92\x02\x89\xea\x55\xc4\x57\x51\xb5\x5c\xe5\xcb\x15\x44\x0d\x49\x06\x86\x23\xd4\xe5\xf2\x3f\xe0\x92\x4c\x9b\xaa\x28\x97\xcb\x6f\xbe\xfd\x1a\x24\xaa\x20\x85\xaa\xb1\x75\xd5\x0f\x27\x92\x95\x92\x4b\x55\xc8\xba\x76\x48\x32\x73\xc3\xde\xff\x65\x6e\x28\x27\xc0\x51\x1c\xf1\x28\x79\x0e\x77\x23\xc3\xbe\xcb\x75\xc7\xb8\x03\xdf\x48\x87\x3d\x7c\x67\xf6\xbb\x4f\xeb\xc5\xbd\x8b\xfd\xb1\x91\xf3\x71\x19\xa4\xd3\x75\x50\x6e\x31\xfb\x4c\x77\x34\xc8\xcd\x2e\xb8\xcc\x9c\x85\x13\xc9\x2c\xb3\x8a\xa9\x79\xd0\x01\x95\x92\xea\x59\x08\x5d\x2a\xd6\x9a\x30\x90\xde\xf6\xfc\x07\x69\xcc\xdf\x6a\x21\x44\x3c\xcd\x97\xe9\x15\x82\x36\x8a\x89\x4d\xde\x50\x53\x6e\xe3\xda\xb8\x2b\xc3\xa0\xa2\x06\x49\x12\xc2\x1a\x56\xbd\x66\x9f\xee\xeb\x2a\x0a\x3b\xc2\xbb\x70\xa8\x78\x47\xcb\x2d\x96\x4f\xce\xea\x45\x3e\x91\x2c\x13\xd2\x57\x53\xb0\x50\x6f\x05\x4c\xb0\x26\x88\x63\xe7\x53\xe8\x87\x13\x19\x30\xb3\x8c\x33\x6d\x5e\x77\x9c\xdb\x5b\x47\xfb\x29\x6d\x2a\xd9\x19\x2f\xdb\xb0\xea\x95\x2f\xe8\x0b\x8d\x3c\xe2\x29\x44\xd5\x32\xbf\xc5\xe3\xc3\xfa\x33\x96\x86\xed\x30\xbb\x0f\xf2\x29\x39\x15\x1b\x8b\x70\x28\x55\x27\x3c\xa7\xf3\xd4\x57\xbf\x3f\xda\xa3\xd9\x4a\x11\xe4\xd1\x1e\x6b\x4e\x9f\xd0\x39\x3e\x92\x67\xa7\x20\xcf\x56\xdf\x85\xce\x4f\x73\x6c\x1d\xc1\x7e\x9c\xed\x0a\xed\x68\x8f\xe7\x13\x37\x48\x36\xd7\xb2\x33\x6d\x67\xb2\x5a\xaa\x86\x9a\xa2\xa5\x4a\x23\x5d\x73\xf4\x29\x50\xd8\x4a\x65\x74\x21\xe4\x95\xe3\xb7\x3c\xd6\x5b\xe4\x3c\xe8\xb0\xde\xd6\x8d\xc3\x3f\x0b\xff\xe2\xc0\xeb\x3d\xab\x0d\x01\x2a\xaa\xf3\x9b\x53\x51\xb5\x67\xe1\xc8\xea\x3d\x33\x75\x39\x4d\xb1\x33\x10\x38\x33\xcf\xa7\xef\x1a\x96\x33\xd1\x1d\xfe\x06\x75\xc0\x0a\x38\xf8\x0c\xd8\x91\x36\xe1\xc0\xb9\x85\xd4\x2b\x8c\x32\xe7\x53\xe6\x12\x4a\x95\xee\x93\x16\x42\x1c\x01\x8a\x6a\xd6\x44\x48\xe1\x1a\x8e\x1d\xc3\xfd\xf0\xaa\x87\x1a\xa3\x09\xad\x79\xe7\x31\x79\xd5\x2f\xad\xcc\x3d\x47\xaa\x5e\x71\xfe\xa6\x33\x06\xd5\x3b\xd4\x9a\x6e\x50\xc7\xb7\xa8\x38\x67\x3d\x60\x0a\x65\x53\xa5\x40\xd5\x46\xa7\xfe\x9e\xf6\xce\xce\x9b\x25\x87\x30\x33\xef\x2d\x24\xbe\x7f\xf8\x49\xae\x1f\x5a\xba\x17\xf1\xc8\x1e\x21\xfd\x6f\xdf\xa8\x49\xf1\xe3\xc1\xdd\xaa\x67\xec\x09\xe0\x3c\x5c\x56\x37\xf6\x87\xe6\xc6\x0e\x18\xfa\x27\xfb\x08\x68\x28\x40\xb7\x7c\xb4\x89\x3c\x0a\xd2\xd3\xf3\x6a\x0a\x37\x78\x80\x62\x6c\x65\xb5\xd1\xdd\x3a\x26\x51\xe4\x5e\xf3\x38\xcf\xb3\x84\x24\xc3\xa4\xab\x86\x38\xaa\x96\xe3\xc9\xc6\x6b\xda\x39\x67\xbb\x96\x0a\xfe\x4c\xdd\x3b\xc4\x04\xb0\x96\x32\xe5\x82\x83\x3a\x81\x4a\x0e\xe9\xca\x32\xf8\xa8\x58\x03\xfb\x2d\x33\xa8\x5b\x5a\xe2\xb8\xfa\x6c\x8b\x68\x87\x95\x7f\xac\xc8\xa7\x48\xdf\x59\x8c\x48\xdf\xfd\x6f\x74\xc3\x5c\x1e\xb5\x9a\x89\xca\xa1\xa4\xde\xad\x59\xe5\xc0\xa4\xff\x74\x01\xc4\x14\x1a\xbd\xb1\x51\x1a\x3f\x8b\x63\x13\x93\xdd\xac\x86\x35\xd5\x28\x6c\x2f\x7a\xdd\xbc\xba\x0e\x7e\x58\x77\xbd\xea\x35\x81\x69\x0d\x4d\xca\x67\xa8\x3f\x23\x45\xd7\xac\x51\x39\x22\x89\xa3\x98\xc2\xcb\x29\x15\x5b\x1a\x73\xf9\xba\xac\x7d\xf2\xb5\x51\x29\x68\x6c\x93\x49\xde\x75\xc7\x6d\xbb\x7e\xfa\x12\xa8\x86\x98\xc4\xbf\x7f\x8a\xf4\x1f\x2e\xc9\xbe\x2a\xe2\xc1\x80\x4d\x2e\xd2\x72\x6b\x53\xab\x8d\x5a\x6d\x7c\xd4\xfa\x90\x8f\xd2\x6b\xec\xbd\x90\x33\xa1\x51\x99\xd8\x03\xa6\x6e\xe7\xe5\x14\xba\x13\x8d\xa6\x53\xa2\x67\x34\x73\x60\x1a\xce\x11\x53\x8d\xad\xeb\xdd\xc9\x3f\xfa\x77\xa0\xd7\x7e\x7c\x24\x13\x64\x6f\xca\xda\xbf\x94\x80\x2b\x69\x5f\x20\x24\xce\xef\x08\xe4\xb9\xdb\x9e\xe7\x40\x92\x38\xbf\x4b\x6c\xa9\x47\x2f\xfb\x02\xec\xb9\x5b\x13\x8e\xf9\x5f\x01\x00\x00\xff\xff\x43\x20\x8f\x97\xdb\x0d\x00\x00") func runtimePluginsLinterLinterLuaBytes() ([]byte, error) { return bindataRead( @@ -3588,6 +3609,7 @@ var _bindata = map[string]func() (*asset, error){ "runtime/plugins/autoclose/utf8/LICENSE": runtimePluginsAutocloseUtf8License, "runtime/plugins/autoclose/utf8/README.md": runtimePluginsAutocloseUtf8ReadmeMd, "runtime/plugins/autoclose/utf8/utf8.lua": runtimePluginsAutocloseUtf8Utf8Lua, + "runtime/plugins/formatter/formatter.lua": runtimePluginsFormatterFormatterLua, "runtime/plugins/ftoptions/ftoptions.lua": runtimePluginsFtoptionsFtoptionsLua, "runtime/plugins/linter/linter.lua": runtimePluginsLinterLinterLua, "runtime/plugins/literate/README.md": runtimePluginsLiterateReadmeMd, @@ -3803,6 +3825,9 @@ var _bintree = &bintree{nil, map[string]*bintree{ "utf8.lua": &bintree{runtimePluginsAutocloseUtf8Utf8Lua, map[string]*bintree{}}, }}, }}, + "formatter": &bintree{nil, map[string]*bintree{ + "formatter.lua": &bintree{runtimePluginsFormatterFormatterLua, map[string]*bintree{}}, + }}, "ftoptions": &bintree{nil, map[string]*bintree{ "ftoptions.lua": &bintree{runtimePluginsFtoptionsFtoptionsLua, map[string]*bintree{}}, }}, diff --git a/runtime/plugins/formatter/formatter.lua b/runtime/plugins/formatter/formatter.lua new file mode 100644 index 0000000000..0c0ca34929 --- /dev/null +++ b/runtime/plugins/formatter/formatter.lua @@ -0,0 +1,31 @@ +if GetOption("formatter") == nil then + AddOption("formatter", false) +end + +MakeCommand("format", "formatter.runFormatter", 0) + +function runFormatter() + CurView():Save(false) + + local ft = CurView().Buf:FileType() + local handle + if ft == "go" then + handle = io.popen("gofmt -s -w " .. CurView().Buf.Path) + elseif ft == "fish" then + handle = io.popen("fish_indent -w " .. CurView().Buf.Path) + elseif ft == "shell" then + handle = io.popen("shfmt -s -w " .. CurView().Buf.Path) + else + return + end + local result = handle:read("*a") + handle:close() + + CurView():ReOpen() +end + +function onSave(view) + if GetOption("formatter") then + runFormatter() + end +end From 8bd8b8e4a6ce38d9c8794359c64682b3ea5e2657 Mon Sep 17 00:00:00 2001 From: Camille Scholtz Date: Wed, 11 Oct 2017 19:24:33 +0200 Subject: [PATCH 2/2] Sort formatters alphabetically --- cmd/micro/runtime.go | 4 ++-- runtime/plugins/formatter/formatter.lua | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/micro/runtime.go b/cmd/micro/runtime.go index 637ac7b1d3..54feb10a9a 100644 --- a/cmd/micro/runtime.go +++ b/cmd/micro/runtime.go @@ -1151,7 +1151,7 @@ func runtimePluginsAutocloseUtf8Utf8Lua() (*asset, error) { return a, nil } -var _runtimePluginsFormatterFormatterLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\x92\xcb\x6a\xf3\x30\x10\x85\xf7\x7e\x8a\x41\x2b\xfb\x27\x11\xff\x3a\xe0\x45\x1b\x48\x57\x25\xa5\x2d\xdd\x16\x11\x8d\x22\x51\x79\x64\x74\x89\xe9\xdb\x17\x59\x4e\x9c\xf4\x42\x88\xc1\x1b\xe9\xe8\x3b\x33\x73\xc6\x28\x78\xc0\xb8\xed\xa3\x71\x54\x33\xe5\x7c\x27\x62\x44\xcf\x1a\x68\x5b\x20\x63\x21\x6a\xa4\x0a\x00\xe0\x4e\xca\x9f\xb2\x05\x28\x61\x03\x36\x15\x92\xac\xaa\x47\xf1\x81\x6b\xd7\x75\x82\xe4\x51\xc4\x16\x30\xcb\xb9\x4f\xb4\x39\x7b\xfb\xbf\xa9\x2a\x95\x68\x97\xa9\x70\x7e\x57\x37\xa3\xe5\x3a\xf9\x37\x83\x43\xdd\xac\x5e\xc4\x01\xeb\xc9\x6a\xbc\xb2\x6e\x27\x2c\xa8\x08\xed\xac\xe2\xf7\x49\xad\x36\xc6\xe2\xeb\x67\x8f\x13\xa2\xe8\xb4\x20\x69\x71\x3c\x30\x6a\x7c\xd5\x02\xdb\x3b\x36\x77\x97\xbf\xa2\x82\x16\x8c\xe3\xbd\xeb\x91\x6a\xb6\x77\xaa\x8b\xb0\x0c\xb0\x1c\x80\x01\xe7\x97\x66\xfc\x49\x44\x5d\x7c\xd0\x06\x9c\xd1\xca\x04\x7d\x1d\x9e\x55\xef\x86\x24\x52\xbc\x91\x1f\x34\x5a\x7b\xdd\x20\xe8\x1b\xaa\x3f\x81\x3c\xc6\xe4\x0b\x37\xa7\x3a\x4f\xd1\x63\x48\x36\x4f\xbc\x58\xad\x3c\x0a\x59\xb3\x7f\x82\x15\xc8\x74\xba\xb3\x2e\xe4\xe9\x7f\x4b\xf0\x19\xb7\xb9\xa6\x69\x53\x4e\xa9\x3b\x1a\xa3\x3d\x18\x1c\x9a\x63\x3e\x7f\x2c\xe4\x45\xb7\xbf\x6c\x4b\x06\xe7\xff\x2b\x00\x00\xff\xff\x47\xe2\x8c\xbd\xd3\x02\x00\x00") +var _runtimePluginsFormatterFormatterLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\x92\xcb\x6a\xf3\x30\x10\x85\xf7\x7a\x8a\x41\x2b\xeb\x27\x11\xff\x3a\xe0\x45\x1b\x48\x57\x25\xa5\x2d\xdd\x16\x11\x8d\x22\x51\x59\x32\xba\xc4\xf4\xed\x8b\x2c\x27\x4e\x7a\x21\xc4\xe0\x8d\x74\xe6\x3b\x9a\x39\x63\x14\x3c\x60\xda\xf6\xc9\x78\xd7\x50\xe5\x43\x27\x52\xc2\x40\x19\xb4\x2d\x38\x63\x21\x69\x74\x04\x00\xe0\x4e\xca\x9f\xb2\x05\x28\x61\x23\x32\x82\x4e\x12\xf2\x28\x3e\x70\xed\xbb\x4e\x38\x79\x14\xd1\x05\xcc\x72\x1e\xb2\xdb\x9c\xd5\xfe\x67\x84\xa8\xec\x76\x85\x0a\xe7\x77\x0d\x1b\x2d\xd7\x39\xbc\x19\x1c\x1a\xb6\x7a\x11\x07\x6c\x26\xab\xf1\xca\xfa\x9d\xb0\xa0\x12\xb4\xb3\x8a\xdf\x67\xb5\xda\x18\x8b\xaf\x9f\x3d\x4e\x88\xaa\xd3\xc2\x49\x8b\xe3\x81\x51\x63\x55\x0b\x54\x99\xa8\xe9\xdc\x5f\xf9\xaa\x0e\x5a\x30\x9e\xf7\xbe\xc7\xd2\xab\x89\xfa\xdd\x38\x89\x2e\xc1\x72\x00\x0a\x9c\x5f\x3a\xf2\x27\x91\x74\x35\x43\x1b\x71\xe6\xef\xfd\x75\xfa\xde\xab\x2e\xc1\x32\xde\x88\x8e\x1a\xad\xbd\x4e\x8f\xfa\x06\xfa\x09\x14\x30\xe5\x50\xb9\x25\xd5\x79\x8a\x01\x63\xb6\x65\xe2\xd5\x6a\x15\x50\xc8\x86\xfe\x13\xb4\x42\xa6\xd3\x9d\xf5\xb1\x4c\xff\x5b\x82\xcf\xb8\x2d\x6f\x9a\x36\xe5\x94\xba\x77\x63\xb4\x07\x83\x03\x3b\xe6\xf3\xc7\x42\x5e\x74\xfb\xcb\xb6\x14\x70\xf9\xbf\x02\x00\x00\xff\xff\x91\xb4\x28\x18\xd3\x02\x00\x00") func runtimePluginsFormatterFormatterLuaBytes() ([]byte, error) { return bindataRead( @@ -1191,7 +1191,7 @@ func runtimePluginsFtoptionsFtoptionsLua() (*asset, error) { return a, nil } -var _runtimePluginsLinterLinterLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x57\xdb\x8e\xdb\x36\x13\xbe\xf7\x53\x0c\x88\x5f\x80\xb4\x96\x94\xbf\x41\xaf\x0c\x08\x45\xba\x6d\x02\x14\x39\x14\xd8\xb4\xbd\xe8\x36\x05\x2d\x8d\x6c\x66\x29\x52\x20\x29\x1f\x60\xe4\xdd\x0b\x92\xb2\x2c\xc9\xf4\xf6\x80\x2c\xb0\xcb\x11\x39\x9c\xef\x9b\x03\xc9\x59\x56\xc3\x1b\x34\x1f\x5a\xc3\xa4\x88\x09\x67\xc2\xa0\x22\x09\x14\x05\x08\xc6\xc1\x6c\x51\x2c\x00\x00\x5e\x55\xd5\x4c\x27\x05\xa3\x3a\x4c\x16\x28\xaa\xc5\xe2\x1d\x7d\xc2\x7b\xd9\x34\x54\x54\x5e\x81\xa4\xd0\x2b\xe6\x76\xe8\xd7\x48\x0a\xff\x4f\x16\x8b\xba\x13\xa5\xb5\x05\xa3\xa5\x38\x71\x38\xf7\x9d\xfa\x95\xe1\x3e\x4e\x56\x0f\x74\x87\x71\x4d\xb9\x46\xbf\xa2\x3a\xf1\xd6\x19\x8c\x7b\xcc\xc1\xca\x78\xc5\x6a\x72\x59\x52\x0e\xb5\x81\xe2\x62\x2e\xff\xbe\xab\x57\xaf\x19\xc7\x8f\xc7\x16\xa7\x7a\x8c\xe3\x5c\x33\xff\x99\x9a\xed\x48\xa7\x62\x0a\x0a\xf8\x81\x29\x2c\x8d\x54\xc7\xf7\xb4\xc1\xd8\xee\xf3\x76\x58\x0d\x1f\x1e\x6c\xc4\xc8\x9e\x89\x4a\xee\x35\xb9\xc4\xcd\xfe\x54\xb8\x13\x1d\xe7\x50\x00\x79\xff\xcb\x5b\xe2\xe6\x91\x6b\x0c\x29\xbc\xa8\x70\xf7\xc2\x7e\xf4\x6a\xd6\xd1\x1e\xc3\x3a\x54\x00\x29\x67\xd6\x6d\x0c\x63\xb2\x29\x4b\x1b\x72\x3f\x9c\x48\x56\xeb\xa3\x30\xf4\x90\x49\xc1\x8f\x76\x21\xfb\x8d\x72\xee\x05\x3c\x18\x45\x49\xea\x1c\xff\x92\x02\x89\xea\x55\xc4\x57\x51\xb5\x5c\xe5\xcb\x15\x44\x0d\x49\x06\x86\x23\xd4\xe5\xf2\x3f\xe0\x92\x4c\x9b\xaa\x28\x97\xcb\x6f\xbe\xfd\x1a\x24\xaa\x20\x85\xaa\xb1\x75\xd5\x0f\x27\x92\x95\x92\x4b\x55\xc8\xba\x76\x48\x32\x73\xc3\xde\xff\x65\x6e\x28\x27\xc0\x51\x1c\xf1\x28\x79\x0e\x77\x23\xc3\xbe\xcb\x75\xc7\xb8\x03\xdf\x48\x87\x3d\x7c\x67\xf6\xbb\x4f\xeb\xc5\xbd\x8b\xfd\xb1\x91\xf3\x71\x19\xa4\xd3\x75\x50\x6e\x31\xfb\x4c\x77\x34\xc8\xcd\x2e\xb8\xcc\x9c\x85\x13\xc9\x2c\xb3\x8a\xa9\x79\xd0\x01\x95\x92\xea\x59\x08\x5d\x2a\xd6\x9a\x30\x90\xde\xf6\xfc\x07\x69\xcc\xdf\x6a\x21\x44\x3c\xcd\x97\xe9\x15\x82\x36\x8a\x89\x4d\xde\x50\x53\x6e\xe3\xda\xb8\x2b\xc3\xa0\xa2\x06\x49\x12\xc2\x1a\x56\xbd\x66\x9f\xee\xeb\x2a\x0a\x3b\xc2\xbb\x70\xa8\x78\x47\xcb\x2d\x96\x4f\xce\xea\x45\x3e\x91\x2c\x13\xd2\x57\x53\xb0\x50\x6f\x05\x4c\xb0\x26\x88\x63\xe7\x53\xe8\x87\x13\x19\x30\xb3\x8c\x33\x6d\x5e\x77\x9c\xdb\x5b\x47\xfb\x29\x6d\x2a\xd9\x19\x2f\xdb\xb0\xea\x95\x2f\xe8\x0b\x8d\x3c\xe2\x29\x44\xd5\x32\xbf\xc5\xe3\xc3\xfa\x33\x96\x86\xed\x30\xbb\x0f\xf2\x29\x39\x15\x1b\x8b\x70\x28\x55\x27\x3c\xa7\xf3\xd4\x57\xbf\x3f\xda\xa3\xd9\x4a\x11\xe4\xd1\x1e\x6b\x4e\x9f\xd0\x39\x3e\x92\x67\xa7\x20\xcf\x56\xdf\x85\xce\x4f\x73\x6c\x1d\xc1\x7e\x9c\xed\x0a\xed\x68\x8f\xe7\x13\x37\x48\x36\xd7\xb2\x33\x6d\x67\xb2\x5a\xaa\x86\x9a\xa2\xa5\x4a\x23\x5d\x73\xf4\x29\x50\xd8\x4a\x65\x74\x21\xe4\x95\xe3\xb7\x3c\xd6\x5b\xe4\x3c\xe8\xb0\xde\xd6\x8d\xc3\x3f\x0b\xff\xe2\xc0\xeb\x3d\xab\x0d\x01\x2a\xaa\xf3\x9b\x53\x51\xb5\x67\xe1\xc8\xea\x3d\x33\x75\x39\x4d\xb1\x33\x10\x38\x33\xcf\xa7\xef\x1a\x96\x33\xd1\x1d\xfe\x06\x75\xc0\x0a\x38\xf8\x0c\xd8\x91\x36\xe1\xc0\xb9\x85\xd4\x2b\x8c\x32\xe7\x53\xe6\x12\x4a\x95\xee\x93\x16\x42\x1c\x01\x8a\x6a\xd6\x44\x48\xe1\x1a\x8e\x1d\xc3\xfd\xf0\xaa\x87\x1a\xa3\x09\xad\x79\xe7\x31\x79\xd5\x2f\xad\xcc\x3d\x47\xaa\x5e\x71\xfe\xa6\x33\x06\xd5\x3b\xd4\x9a\x6e\x50\xc7\xb7\xa8\x38\x67\x3d\x60\x0a\x65\x53\xa5\x40\xd5\x46\xa7\xfe\x9e\xf6\xce\xce\x9b\x25\x87\x30\x33\xef\x2d\x24\xbe\x7f\xf8\x49\xae\x1f\x5a\xba\x17\xf1\xc8\x1e\x21\xfd\x6f\xdf\xa8\x49\xf1\xe3\xc1\xdd\xaa\x67\xec\x09\xe0\x3c\x5c\x56\x37\xf6\x87\xe6\xc6\x0e\x18\xfa\x27\xfb\x08\x68\x28\x40\xb7\x7c\xb4\x89\x3c\x0a\xd2\xd3\xf3\x6a\x0a\x37\x78\x80\x62\x6c\x65\xb5\xd1\xdd\x3a\x26\x51\xe4\x5e\xf3\x38\xcf\xb3\x84\x24\xc3\xa4\xab\x86\x38\xaa\x96\xe3\xc9\xc6\x6b\xda\x39\x67\xbb\x96\x0a\xfe\x4c\xdd\x3b\xc4\x04\xb0\x96\x32\xe5\x82\x83\x3a\x81\x4a\x0e\xe9\xca\x32\xf8\xa8\x58\x03\xfb\x2d\x33\xa8\x5b\x5a\xe2\xb8\xfa\x6c\x8b\x68\x87\x95\x7f\xac\xc8\xa7\x48\xdf\x59\x8c\x48\xdf\xfd\x6f\x74\xc3\x5c\x1e\xb5\x9a\x89\xca\xa1\xa4\xde\xad\x59\xe5\xc0\xa4\xff\x74\x01\xc4\x14\x1a\xbd\xb1\x51\x1a\x3f\x8b\x63\x13\x93\xdd\xac\x86\x35\xd5\x28\x6c\x2f\x7a\xdd\xbc\xba\x0e\x7e\x58\x77\xbd\xea\x35\x81\x69\x0d\x4d\xca\x67\xa8\x3f\x23\x45\xd7\xac\x51\x39\x22\x89\xa3\x98\xc2\xcb\x29\x15\x5b\x1a\x73\xf9\xba\xac\x7d\xf2\xb5\x51\x29\x68\x6c\x93\x49\xde\x75\xc7\x6d\xbb\x7e\xfa\x12\xa8\x86\x98\xc4\xbf\x7f\x8a\xf4\x1f\x2e\xc9\xbe\x2a\xe2\xc1\x80\x4d\x2e\xd2\x72\x6b\x53\xab\x8d\x5a\x6d\x7c\xd4\xfa\x90\x8f\xd2\x6b\xec\xbd\x90\x33\xa1\x51\x99\xd8\x03\xa6\x6e\xe7\xe5\x14\xba\x13\x8d\xa6\x53\xa2\x67\x34\x73\x60\x1a\xce\x11\x53\x8d\xad\xeb\xdd\xc9\x3f\xfa\x77\xa0\xd7\x7e\x7c\x24\x13\x64\x6f\xca\xda\xbf\x94\x80\x2b\x69\x5f\x20\x24\xce\xef\x08\xe4\xb9\xdb\x9e\xe7\x40\x92\x38\xbf\x4b\x6c\xa9\x47\x2f\xfb\x02\xec\xb9\x5b\x13\x8e\xf9\x5f\x01\x00\x00\xff\xff\x43\x20\x8f\x97\xdb\x0d\x00\x00") +var _runtimePluginsLinterLinterLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x56\x6d\x8b\xe3\x36\x10\xfe\xbc\xf9\x15\x83\xa8\xc1\xde\xd8\xbe\xf6\xe8\xa7\x80\x29\xd7\x6d\xef\xa0\xdc\x4b\xe1\xae\xed\x87\x6e\xaf\x28\xd6\x38\xd1\xad\x2c\x19\x49\xce\x0b\xe1\xfe\x7b\x91\xe4\x38\xb6\xe3\xdd\x6e\xe9\xc2\x46\xb2\x34\x9a\xe7\x99\x17\x8d\x86\x57\xf0\x06\xed\x87\xc6\x72\x25\x63\x22\xb8\xb4\xa8\x49\x02\x45\x01\x92\x0b\xb0\x5b\x94\x0b\x00\x80\x57\x8c\x4d\x64\x52\xb0\xba\xc5\x64\x81\x92\x2d\x16\xef\xe8\x03\xde\xa9\xba\xa6\x92\x05\x01\x92\x42\x27\x98\xbb\xa1\xdb\x23\x29\x7c\x9b\x2c\x16\x55\x2b\x4b\xa7\x0b\x06\x5b\x71\xe2\x71\xee\x5a\xfd\x3b\xc7\x7d\x9c\xac\x3e\xd2\x1d\xc6\x15\x15\x06\xc3\x8e\x6e\xe5\x5b\xaf\x30\xee\x30\x7b\x2d\xc3\x1d\x27\x29\x54\x49\x05\x54\x16\x8a\x8b\xba\xfc\xc7\xb6\x5a\xbd\xe6\x02\x3f\x1d\x1b\x1c\xcb\x71\x81\x53\xc9\xfc\x57\x6a\xb7\x03\x19\xc6\x35\x14\xf0\x13\xd7\x58\x5a\xa5\x8f\xef\x69\x8d\xb1\x3b\x17\xf4\xf0\x0a\x3e\x7c\x74\x1e\x23\x7b\x2e\x99\xda\x1b\x72\xf1\x9b\xfb\x63\xb8\x93\xad\x10\x50\x00\x79\xff\xdb\x5b\xe2\xd7\x51\x18\xf4\x93\x9b\xc1\xee\x0b\x86\xbb\x17\xee\xa3\x93\x91\xec\xac\xdf\x19\x53\x00\xd9\xa8\x89\x6a\xe7\xc0\x98\x6c\xd4\xba\xe5\xc2\x79\xd7\x49\xa4\x70\x22\xfd\x77\xe6\xbe\x3b\x88\xaf\x29\x90\xa8\x5a\x45\x62\x05\x51\x4d\x92\x2b\x25\xe7\xb8\xf5\xb3\x93\xb3\xf1\x72\x2a\x62\xcb\xc1\x49\x67\xc1\x85\x99\x68\xe9\x2c\x35\xd1\xd2\x72\x8b\xe5\x83\xcf\x87\xcb\xfc\x44\xb2\x4c\xaa\xac\x54\x42\xb9\x4c\x7a\x3e\x4e\x73\xb4\x5b\x25\x67\xa1\x9a\x63\x25\xe8\x03\x1a\x07\x35\x98\x4f\x8c\xc8\xb3\xd5\x0f\x73\xe6\xd7\xc7\xe6\xe8\x4e\x76\xe3\xe4\xd4\xdc\x89\xe6\x78\x76\x58\x3f\x73\x66\xa9\xd6\x36\xad\xcd\x2a\xa5\x6b\x6a\x8b\x86\x6a\x83\x74\x2d\xd0\x07\x23\xd3\xd8\x28\x6d\x4d\x21\xd5\x95\xd5\x8f\x59\x5c\xce\x87\xbc\x2c\x7d\xa8\xfc\x70\x22\x59\x65\x8e\xd2\xd2\x43\xa6\xa4\xf0\x66\x64\x7f\x50\x21\xc2\x04\x0f\x56\xd3\x59\x27\xe7\x67\x3f\xdf\x5c\x81\x2e\x97\x63\xd8\xe7\xa0\x92\xcc\x58\x56\x94\xcb\xe5\x77\xdf\xff\x67\x0a\x37\x37\x33\xa6\x9b\x3d\xaf\x2c\x01\x2a\xd9\xf9\x82\x31\xaa\xf7\xbc\x0b\x3f\x4c\x5c\x62\xf6\xdc\x56\x9e\xdf\xa1\xd4\xad\xf4\x0c\xbd\x86\xf2\x69\xe3\x9f\x83\x2b\xb8\x6c\x0f\xff\x06\xdb\x83\xcd\xdc\x9b\x27\xd0\x3e\xac\xbf\x60\x69\xf9\x0e\xb3\xbb\xd9\x50\x97\x82\xca\xcd\xd8\xac\x7e\xe9\x7f\xc6\xfd\x9a\x0c\x9b\xa5\xc0\x6a\x5f\x4c\xc2\x70\x22\xe1\xde\x16\xaa\xaa\x42\x89\xc9\xfc\xb0\x0f\xbf\xdc\x0f\x63\x9f\x47\x71\x24\xa2\xe4\x29\xdc\x2f\x74\x37\x5f\x40\xdc\x86\xf7\xee\x79\x72\x22\x99\x63\xc1\xb8\xbe\xba\x41\xa8\xb5\xd2\x4f\x42\x98\x52\xf3\xc6\xce\x03\x99\x6d\x77\x9d\xfb\xd9\x30\x8e\x4e\x0a\x21\x12\x69\xbe\x4c\x1f\x43\x90\xbc\x9e\x55\xed\xd6\x53\xe8\x86\x13\xe9\x0b\x62\x96\x09\x6e\xec\xeb\x56\x08\xf7\xde\x98\xb0\x64\x2c\x53\xad\x0d\x73\xc7\xc3\xac\x82\x9f\x2f\x5c\xf2\x48\xa4\x10\xb1\x65\x7e\xc5\xc3\x58\xcd\xe5\x26\xaf\xa9\x2d\xb7\x71\x65\xfd\x1b\x6c\x51\x53\x8b\x24\x99\xad\xce\xe7\xdd\x20\xd9\x05\xf7\x3a\x67\xe6\xcd\x3d\xd2\x5a\xcc\xda\xeb\x37\xd2\x20\x30\xa8\x8c\xa1\x24\xfa\x82\x49\xb5\xe9\x8a\xe2\x5c\x76\x0e\xec\x92\x6c\xf2\xd8\x2b\xe9\x1b\x83\x1d\xc7\x7d\xff\xfa\xce\x35\x30\x23\x5a\xd3\x0e\xa1\x7f\x7d\xc7\x2d\xc7\x9d\x40\xaa\x5f\x09\xf1\xa6\xb5\x16\xf5\x3b\x34\x86\x6e\xd0\xc4\x8f\x51\xf1\xc6\x06\xc0\x14\xca\x9a\xa5\x40\xf5\xc6\xa4\x21\x0d\x83\xb1\xd3\xa6\xc6\x23\x4c\xd4\x07\x0d\xc9\xc2\x8b\xfe\xa2\xd6\x1f\x1b\xba\x97\xf1\x40\x1f\x21\xdd\x7f\xd7\x50\x29\xf9\xf3\xc1\x07\xeb\x8c\x3d\x02\x9c\xba\xcb\xc9\xc6\xe1\x51\x7a\xe4\xc4\xa5\xcf\x71\x39\x6e\xa0\x00\xd3\x88\xc1\x21\x72\x2f\x49\x47\x2f\x88\x69\xdc\xe0\x01\x8a\xa1\x96\xd5\xc6\xb4\xeb\x98\x44\x91\x2f\x09\x71\x9e\x67\x09\x49\xfa\x45\x9f\x0d\x71\xc4\x96\xc3\xc5\x3a\x48\xba\x35\xaf\xbb\x52\x1a\xfe\x4e\xfd\x35\xe3\x12\x78\x43\xb9\xf6\xce\x41\x93\x00\x53\x7d\xb8\xb2\x0c\x3e\x69\x5e\xc3\x7e\xcb\x2d\x9a\x86\x96\x38\xcc\x3e\xd7\xca\xb9\x61\x15\xee\x00\xf9\x1c\x99\x5b\x87\x11\x99\xdb\x6f\x06\x2f\xf8\xe5\xae\x54\x5c\x32\x8f\x92\x06\xb3\x26\x99\x03\xa3\x3e\xd1\x3b\x10\x53\xa8\xcd\xc6\x79\x69\x78\xdb\x86\x2a\x46\xa7\x79\x05\x6b\x6a\x50\xba\x9e\xf1\xba\xc9\xf4\x9d\x76\xbf\xef\x7b\xca\x6b\x02\xe3\x1c\x1a\xa5\x4f\x9f\x7f\x56\xc9\xb6\x5e\xa3\xf6\x44\x12\x4f\x31\x85\x97\x63\x2a\xe7\x86\x72\x38\xbf\x4e\xeb\x10\x7c\x63\x75\x0a\x06\x9b\x64\x14\x77\xd3\x0a\xd7\x56\x9f\xbe\xce\x64\x43\x4c\xe2\x3f\x3f\x47\xe6\x2f\x1f\xe4\x90\x15\x71\xaf\xc0\x05\x17\x69\xb9\x75\xa1\x35\x56\xaf\x36\xc1\x6b\x9d\xcb\x07\xe1\xb5\xae\x2e\xe4\x5c\x1a\xd4\x36\x0e\x80\xa9\x3f\x99\x8c\x7a\x62\x8d\xb6\xd5\xb2\x63\x34\x31\x60\xec\xce\x01\x53\x83\x8d\x6f\xb3\xc9\xb3\xda\xf6\x4e\xfa\xfe\x7e\xdc\x8d\x07\x55\x4e\xff\x25\x05\x7c\x4a\x87\x04\x21\x71\x7e\x4b\x20\xcf\xfd\xf1\x3c\x07\x92\xc4\xf9\x6d\xe2\x52\x3d\x7a\xd9\x25\x60\xc7\xdd\xa9\xf0\xcc\xff\x09\x00\x00\xff\xff\x26\x00\xad\xc4\x83\x0d\x00\x00") func runtimePluginsLinterLinterLuaBytes() ([]byte, error) { return bindataRead( diff --git a/runtime/plugins/formatter/formatter.lua b/runtime/plugins/formatter/formatter.lua index 0c0ca34929..7e5531b244 100644 --- a/runtime/plugins/formatter/formatter.lua +++ b/runtime/plugins/formatter/formatter.lua @@ -9,10 +9,10 @@ function runFormatter() local ft = CurView().Buf:FileType() local handle - if ft == "go" then - handle = io.popen("gofmt -s -w " .. CurView().Buf.Path) - elseif ft == "fish" then + if ft == "fish" then handle = io.popen("fish_indent -w " .. CurView().Buf.Path) + elseif ft == "go" then + handle = io.popen("gofmt -s -w " .. CurView().Buf.Path) elseif ft == "shell" then handle = io.popen("shfmt -s -w " .. CurView().Buf.Path) else