]> git.lizzy.rs Git - micro.git/commitdiff
Support column marking in linter
authorZachary Yedidia <zyedidia@gmail.com>
Tue, 6 Aug 2019 04:36:58 +0000 (21:36 -0700)
committerZachary Yedidia <zyedidia@gmail.com>
Wed, 25 Dec 2019 22:05:11 +0000 (17:05 -0500)
internal/config/rtfiles.go
internal/config/runtime.go
internal/display/bufwindow.go
runtime/plugins/linter/linter.lua

index d31b412333c830d9f337d0ed6739425e2589c3f2..16cc04d148b739315cc546a06a53fd7c13f972b8 100644 (file)
@@ -134,6 +134,14 @@ func InitRuntimeFiles() {
        add(RTSyntax, "syntax", "*.yaml")
        add(RTHelp, "help", "*.md")
 
+       initlua := filepath.Join(ConfigDir, "init.lua")
+       if _, err := os.Stat(initlua); !os.IsNotExist(err) {
+               p := new(Plugin)
+               p.Name = "initlua"
+               p.Srcs = append(p.Srcs, realFile(initlua))
+               Plugins = append(Plugins, p)
+       }
+
        // Search ConfigDir for plugin-scripts
        plugdir := filepath.Join(ConfigDir, "plugins")
        files, _ := ioutil.ReadDir(plugdir)
index 7690ddc378fa02d9502fc54be59329e80dbe85ec..0fa2f4e353ee2275d022cdb4203989b8a1eedae0 100644 (file)
@@ -1092,7 +1092,7 @@ func runtimePluginsFtoptionsFtoptionsLua() (*asset, error) {
        return a, nil
 }
 
-var _runtimePluginsLinterLinterLua = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x18\x69\x8f\xa4\xb8\xf5\x7b\xff\x8a\x27\x14\x24\x98\x06\x5a\x89\xf2\x09\xa9\x14\x6d\x26\xbb\x91\xa2\x39\x22\xf5\x44\xf9\x30\x33\x1b\xb9\xe0\x51\xe5\x6d\x63\x13\xdb\x54\x75\xa5\x35\xff\x3d\x7a\xb6\x01\x53\x47\xef\xe4\x28\xa9\xf0\xc1\xbb\x2f\x3f\x23\x54\xc3\x04\xe8\x51\x5a\xde\x23\x6c\x80\xf7\x83\xd2\x36\x4b\xc2\x4e\x92\xdf\x79\x88\x8e\x0b\x1c\x98\xdd\x47\x20\xb4\x7c\x98\xf6\x67\x40\xb3\x47\x21\x22\xa8\x9e\x37\x5a\x3d\xb8\xdd\x19\x66\x3b\x76\x1d\xea\x0b\x20\xbf\x3d\x43\x35\x4a\x76\x7c\x77\x01\xe5\xb7\x93\xfc\x2e\x80\x09\x2e\x2d\x6a\x03\x1b\x78\xf9\x76\x77\x57\x96\xd0\x68\x64\x16\x0d\xb0\xf0\x0a\x50\x5a\x7d\x2a\xa0\x61\x42\x40\xa7\x55\x0f\x47\x6e\xf7\x5c\x02\x93\xc0\x25\xb7\x9c\x09\xfe\x2f\x66\xb9\x92\xd0\x8d\xb2\xa1\x49\x01\x52\x59\xa2\xd5\x72\x8d\x8d\x15\x27\x60\x76\x82\x05\xa1\x58\x0b\x64\x9c\xbb\xb2\x24\x18\xc9\x7a\xac\xdd\x13\x54\x07\x76\x8f\x81\x2f\xbd\x23\xf3\xd8\xd3\x80\xf5\x3c\x03\xab\xa0\xd9\x63\xf3\x04\x9d\xd2\xb4\x18\x4d\x8c\xd0\xf4\x6d\x0d\x3d\xe3\x72\x12\x7e\xd0\xaa\x41\x63\xc0\xee\x49\x04\x03\xf8\x8c\xcd\x68\xb1\x25\x60\xa6\x77\xa6\xa6\xe7\xd8\xa3\xb4\x86\xa8\x0d\xcc\xb8\x71\x11\x63\xa2\x40\x08\xf4\x23\x7e\x69\x47\x30\x1a\xc9\x0b\x01\xb8\x19\xb5\x46\x69\x9d\x9c\x4e\x99\x15\x7c\x7b\x13\xde\x5b\x48\xe9\xd3\x8c\x84\x5a\x2b\xdd\x29\xdd\x33\x5b\xc3\x5e\x1d\xbd\x58\xda\x60\x24\xd4\x43\xa3\xfa\x81\x8b\x48\x3f\x35\xda\x61\xb4\x13\xd3\xb4\xf3\x16\x2b\x20\x15\x35\xe1\x20\xc8\xb1\xdf\xa2\x2e\x20\xed\x6b\xcf\xe2\xe1\xc8\xb4\xe4\x72\x07\x3d\x1a\xc3\x76\x8e\xb7\x32\x04\x6d\x2c\x79\xe2\xe3\x23\x59\x8d\x9b\xc9\x0e\xdc\x80\x19\x07\x0a\x25\x6c\x41\x69\x18\x65\xb4\x94\x13\x67\x35\x50\x00\x30\x41\x22\xb3\xbe\x80\x16\x3b\x36\x0a\x5b\xc3\xe7\xaf\x04\x72\xdc\x73\x8b\xc4\xa1\x06\xb3\x57\xa3\x68\x9d\x52\x1f\x1f\x3d\xd7\x2d\x02\x83\xad\x60\xcd\x93\x5b\x66\xad\xa2\x40\xa2\xf4\x8a\x1d\xe2\x1c\xbf\x47\x43\x78\x26\x77\x62\x6b\x60\x0b\x69\xc8\x94\x14\xa7\x5f\xc7\x7a\x55\xdc\x8e\x09\x83\x90\x05\x21\x67\x99\x1c\x62\xab\x7a\x66\x9b\xfd\x4a\x85\x39\x3e\xb7\x08\x8e\xe1\xa0\x91\x2c\xc3\x5c\x22\x8d\x0c\x06\x66\x2d\x6a\x49\xde\x74\xd8\x2e\x8b\x88\x1a\x61\xb3\xc6\x8e\xa1\x4a\x10\x91\x82\x34\x8a\x88\x07\x15\x9c\x5a\xac\xb1\xfc\xc0\x2c\x82\x72\x19\x88\xcf\xac\xb1\x9e\xe2\xf7\xea\xa4\xf1\x9f\x23\xd7\x18\xa3\xe6\x77\x53\xea\x42\xcf\x9e\xf0\x9d\xe3\x97\x51\x44\x16\x91\x50\x4d\xdf\x16\x2e\x69\x8a\x38\x48\x0b\x50\xa6\x58\xac\x5f\x4c\xe6\xc9\xef\x48\x18\xde\x4d\x15\xe6\x33\x91\xfb\x0a\x9b\x0d\x48\x2e\x48\x2d\xe9\x00\xe8\x77\x06\x41\x95\xe8\xea\xab\x6a\xb6\xf2\x66\x16\xeb\x06\x64\xd3\xb7\xb0\x21\x89\x6f\xbc\x27\x35\x60\xe3\xb4\xb9\x01\x11\xa9\x08\x9b\x58\xe1\x1b\xf0\x8a\xe8\x29\x43\xae\xbb\x29\xff\x12\xa3\x9b\x28\x5e\x95\xf6\xae\xb9\x81\x14\xec\x09\x9b\xc9\xb2\x6b\x04\x94\xed\x1d\xfd\x17\x17\x6a\xec\xd5\x21\x76\xa2\x77\xc5\xb9\x95\x25\x17\x67\x88\x54\xa2\xb3\x00\xec\x0e\x87\x16\x0f\x72\x74\xe7\x51\xf2\xd0\xe2\xe1\x81\x16\xc9\xe4\xd7\x70\xc6\x55\x7f\xfe\xf8\xf1\x91\xdc\x9a\x1c\xb9\x6c\xd5\xd1\x24\x6b\xe7\x46\x34\x3e\xfc\xed\x5d\x32\xcb\xec\x26\x51\xb4\x25\xbb\xa6\x49\x0a\x48\xdc\xc3\xcf\x5f\x92\xb2\x33\x27\x69\xd9\x73\x49\xb1\x4f\x2f\xca\xbf\x33\x21\xfc\x04\x9f\xad\x66\x34\x4d\xbb\xe4\x9b\x1b\xea\x54\xd4\x69\x7b\x5f\x57\xf7\x35\xa4\x7d\x92\xdf\x64\x71\x7f\xff\x0a\x93\xa4\x34\xb6\xdd\x34\xf7\xf7\xbf\xfd\xfd\xff\xce\xb1\xed\x5b\x42\xf0\x0f\x37\x7f\x49\xca\x46\x09\xa5\x37\xaa\xeb\x1c\x59\x55\xba\xe1\xe8\x9f\xdc\x0d\xcd\x8a\x4b\x9a\xa5\x22\xcd\x5f\x51\x4b\x6d\x47\x2e\x1c\x8f\x9d\x9a\x9f\x2f\xc9\xbc\x5b\xd2\x3a\x38\x62\x11\xfc\x16\x31\x0a\x94\x98\x56\x58\xbf\x5c\xaa\x7d\x9d\xc2\x2f\xec\xc0\x9c\x02\x34\x99\xc6\x60\x6a\x27\x4e\xda\x5e\x18\xd1\x27\xd8\x2d\x82\x66\x1f\x44\x22\x4a\xa6\xd1\x7c\xf0\xab\x69\x3f\x16\xcd\x1f\x77\xa9\x28\xaa\xfb\xe2\x3a\x39\xc1\x2d\x6a\x66\x91\x48\x9c\xcd\x83\x7f\x2e\x7d\xdc\xd3\x9b\x6f\x85\xcf\xbb\x02\xac\x1e\xf1\x0a\xe1\x91\xb9\xde\xc4\x11\x1b\x59\x18\xa6\xad\x97\xa4\x2c\xa5\xf2\xce\xbf\x1a\x44\xd7\xa5\x95\x9c\x78\xaf\x87\x97\x64\xe6\x53\x96\x54\x43\x7e\x1a\x85\xf8\x2b\xb3\x7b\xe3\xb7\x8c\x6d\xd5\x68\xfd\x9c\x4c\x64\xea\x10\x6c\x33\xcf\x2a\x15\x05\xa4\xed\x7d\x75\x9d\x69\x23\x98\xdc\x11\x82\xda\xfe\x82\x74\xe2\xa0\x37\xca\x73\xa3\x47\xe9\x05\x98\x20\xfe\xcf\x29\x3a\x9c\x3a\xc1\x9e\xd0\x29\x32\x9c\xec\x5e\x49\x3f\x9b\x77\xcf\xc2\xb0\x2a\xeb\x3f\x5c\xa7\xd4\x9f\x86\xd3\x9a\x4a\xd8\x39\xa3\x70\x4b\x8e\x29\x0d\x62\x29\xe6\x54\x28\x4b\xdf\x71\x95\xfe\x4c\xd8\xb8\x0e\x8d\x6d\x05\x7a\xa3\x6b\xa4\xce\xc8\x6c\xa4\xba\x8c\xf4\xab\xec\xcc\xbe\xeb\x1d\x37\xdf\xea\xbb\x89\xdf\xf9\xee\xb4\x33\x47\x6e\x3b\xe7\x25\x73\xe4\x9d\x5d\xbb\xcb\x6d\x5d\x89\xeb\xc5\x15\x04\xd5\x32\x7d\xe4\x92\xde\x5f\x0f\xf0\x33\x16\xcd\x75\xf1\x22\x82\x82\xcb\xf1\xf9\x36\xbd\x13\xeb\x9d\xae\xf1\x18\x99\xd8\xdb\xd6\x59\x9e\x69\x33\x59\xf7\x0a\x3f\x6f\x10\x47\xde\xdf\x6f\xaa\xf7\xec\x09\xdf\xaa\xbe\x67\xb2\xa5\x84\xf7\x9e\xf4\x27\x60\x45\xc3\x5b\x57\x8b\x03\xf0\x07\xf5\x56\xf5\x83\x40\x8b\xf9\xd9\x89\x18\x40\xb3\xed\xe0\x85\xdf\x0e\xf5\x23\x3b\x60\x38\x24\xf5\x28\x83\x26\xdb\xa1\xfa\xe3\xd8\x9d\x63\x37\x4a\x5a\xc6\xa5\xc9\x7c\x63\x84\x02\xe9\xa2\xe1\x71\xa9\x1f\x7d\x2a\xe0\x00\x5c\xc2\xc0\xb8\xf6\x40\x39\xb4\x6a\x3e\x39\x79\x07\x07\x3a\x58\x03\xde\xfa\x58\x75\xfc\xd1\x8e\xd4\x52\xea\x71\xe9\x1d\x48\x82\x78\x0c\x30\xbe\x5f\x38\xeb\x13\x16\xf1\x49\xf6\xe5\xd8\xef\xa8\x3f\xd9\x8e\x5d\xfd\x13\x17\xf8\xe9\x34\xe0\xaa\x29\x70\x57\x1c\xf7\xbe\xa2\x92\x13\xb7\x0b\x5c\x87\xce\x8c\xee\xb4\xd5\x9f\xb8\xce\x68\x11\x3c\x73\x4d\x63\xd7\x91\xac\x94\x9e\x24\x98\x7a\x1e\x92\x65\x03\x87\xea\xa2\xdf\x23\xeb\xcc\xbd\xd1\x85\x69\x16\x02\xc6\x6a\x2e\x77\x95\x5b\x66\x9d\x2d\x22\x5a\xf9\xca\x6a\x67\x22\xec\x99\xa1\xbe\x66\x71\xe2\xa1\xa2\x46\x37\xee\x7a\xf2\x58\x18\xba\xa9\x78\x1c\x26\x5b\x38\x44\xbd\xde\x2b\xc2\xad\xfb\xbe\xc9\x67\x81\xe2\x42\x8d\x68\xff\xd7\x14\xcf\xf4\x0a\x9d\x6f\xd4\xa3\x06\xc7\x30\xbd\x5b\x5c\x73\x70\x1d\xf2\xca\x33\xf4\xa3\xcd\xcf\x4f\x5f\x7d\xe7\x5c\xef\xcc\xb8\xcd\x92\x34\xa5\xa3\xc5\x39\x7a\xde\xa1\xe4\x6a\xb9\xbe\x61\x60\xde\xcd\x02\x5f\x68\x42\x31\x41\xf1\x58\xb8\x58\xa9\xa2\x3b\xc7\x21\x6e\xc9\xf3\xab\x01\xbf\x8e\x6f\x25\x5d\xae\x4e\xb9\x7b\x99\xad\xbf\x92\x1f\x8b\x28\x3e\x50\x6f\xdd\x80\x42\x69\x18\xbb\xfa\xad\x40\xa6\xdf\xfb\xfb\xb4\xc9\x42\xbd\x99\x2a\x93\xab\xec\xd5\x5f\xd4\xf6\x71\x60\x47\x99\x45\xb4\x92\x24\xfc\x43\x81\x52\xf2\xc7\x67\xd7\x8b\xac\x98\xaf\x38\x9e\x6b\x4a\x08\x99\x3f\x92\x5e\x43\x5b\xc2\x80\xba\x24\x8a\x03\x33\x88\x08\x33\xf9\x22\x27\x71\xc3\xa7\x2d\xdc\xe1\xf3\xfa\xfe\xb3\x72\x7b\x92\x55\x55\x99\x27\x8b\xe7\x5d\x1d\xcf\xd2\xf6\x3e\xde\xec\x3d\x24\xed\xcd\xa5\xe0\x1f\x85\x6b\xd4\xb8\x04\x3e\x57\x03\x5c\x47\x5c\x59\xc2\x27\xcd\x7b\x7f\x55\x32\x03\x6b\x56\x57\x24\x2a\x42\x34\xd4\x3e\xb5\x93\x9f\x53\xf3\x86\x78\xa4\xe6\xcd\x6f\x92\x55\x6a\x86\x12\xd0\x71\xd9\x3a\x2e\x85\x57\x2b\xbf\x12\x7d\x73\x85\x73\x06\xc4\x02\x7a\xb3\x3b\x2f\x22\x31\x89\x15\x36\xef\x60\xcb\x0c\xd2\x05\x2b\x9b\xca\x63\x4e\xe5\x6b\xde\x75\x59\x72\xc9\x76\x61\xbd\xf5\xfc\xfc\xb7\xbc\xea\x03\x1e\x43\x34\xfd\x60\xdf\x71\x89\x73\x48\x39\xb9\x0a\xb0\xca\x7f\xd6\x71\x22\xe5\xc5\x84\xf6\xfe\xd3\x8f\xe4\xae\xfc\x82\x07\xc5\xe8\x0f\x6d\x1b\x68\x66\xc4\x6c\x0d\x14\x57\xa0\xdb\x89\xe5\x63\xc6\x58\x5d\x80\xc1\x21\x5f\x85\x8b\x19\x85\x5d\xca\xcb\x3a\x88\xb2\x24\xfb\xfc\x73\x6a\xbe\xba\xd8\xf0\xc1\x94\xcd\x04\x28\x26\x90\x35\x7b\x8a\x08\x63\x75\xbd\xf3\xc6\x0e\x9e\x8a\xa2\xc2\x52\x23\x50\x71\x69\x50\xdb\xcc\x33\x2c\x1c\x66\x7e\xed\xe0\xf3\x00\x67\x0a\xac\xfd\x11\x49\x6a\x70\x70\x97\xdd\xff\xf4\x92\x1b\xf0\xbe\x7c\x49\x56\x32\x78\xa2\xee\xdb\xe6\x1c\x43\x2e\x27\x7c\x84\x25\x59\xf5\x26\x81\xaa\x72\xe8\x55\x05\x49\x9e\x55\x6f\x72\xd7\xe3\xfc\x2e\x59\x95\x27\xf7\x71\x90\xa8\xfe\x3b\x00\x00\xff\xff\x62\x4a\x34\x00\x71\x16\x00\x00"
+var _runtimePluginsLinterLinterLua = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x59\x5f\x8f\xa4\xb8\x11\x7f\x9f\x4f\x61\xa1\x20\xd1\x3b\xc0\xec\x46\x79\x42\x6a\x45\x97\xcd\x5d\xa4\x68\xff\x44\x9a\x8d\xf2\xb0\xbb\x17\xb9\x4d\xd1\xed\x1b\x63\x13\xdb\x74\x4f\x67\xb4\xdf\x3d\x2a\xdb\xd0\x86\x86\xd9\xc9\xdd\xb5\x34\x60\x4c\xb9\xea\x57\x7f\x5d\x66\x84\x62\x54\x10\xdd\x4b\xcb\x5b\x20\x5b\xc2\xdb\x4e\x69\x9b\x25\x61\x26\xd9\xdc\x78\x8a\x86\x0b\xe8\xa8\x3d\x44\x24\xf8\x78\x37\xcc\x8f\x84\xe6\x00\x42\x44\x54\x2d\x67\x5a\xdd\xb9\xd9\x91\x66\xd7\x37\x0d\xe8\x2b\x22\x3f\x3d\x52\x31\x25\x1b\xbe\xbf\xa2\xf2\xd3\xc9\xe6\x26\x90\x09\x2e\x2d\x68\x43\xb6\xe4\xe9\xdb\xcd\x4d\x51\x10\xa6\x81\x5a\x30\x84\x86\x57\x04\xa4\xd5\xe7\x9c\x30\x2a\x04\x69\xb4\x6a\xc9\x89\xdb\x03\x97\x84\x4a\xc2\x25\xb7\x9c\x0a\xfe\x5f\x6a\xb9\x92\xa4\xe9\x25\xc3\x41\x4e\xa4\xb2\xc8\xab\xe6\x1a\x98\x15\x67\x42\xed\x40\x4b\x84\xa2\x35\x41\xe3\xdc\x14\x05\xd2\x48\xda\x42\xe5\xae\x44\x35\xc4\x1e\x20\xc8\xc5\x77\x68\x1e\x7b\xee\xa0\x1a\x47\xc4\x2a\xc2\x0e\xc0\x1e\x48\xa3\x34\x3e\xf4\x26\x5e\xc0\xda\xba\x22\x2d\xe5\x72\x00\xdf\x69\xc5\xc0\x18\x62\x0f\x08\xc1\x10\x78\x04\xd6\x5b\xa8\x91\x98\xea\xbd\xa9\xf0\xda\xb7\x20\xad\x41\x6e\x1d\x35\xee\x7e\x81\x31\x70\xc0\x05\xf8\x43\x79\x69\x83\x34\x1a\xd0\x0b\x81\x98\xf5\x5a\x83\xb4\x0e\xa7\x53\x66\x42\x5f\xaf\xd2\x7b\x0b\x29\x7d\x1e\x17\x81\xd6\x4a\x37\x4a\xb7\xd4\x56\xe4\xa0\x4e\x1e\x96\x36\x10\x81\xba\x63\xaa\xed\xb8\x88\xf4\x53\xbd\xed\x7a\x3b\x08\x4d\x1b\x6f\xb1\x9c\xa4\xa2\xc2\x35\x40\x64\xdf\xee\x40\xe7\x24\x6d\x2b\x2f\xe2\xee\x44\xb5\xe4\x72\x4f\x5a\x30\x86\xee\x9d\x6c\x65\x90\xda\x58\xf4\xc4\xc7\x7b\xb4\x1a\x37\x83\x1d\xb8\x21\xa6\xef\x30\x94\xa0\x26\x4a\x93\x5e\x46\x8f\x72\x90\xac\x3a\x0c\x00\x2a\x10\x32\x6d\x73\x52\x43\x43\x7b\x61\x2b\x8c\xae\xa2\x20\xa7\x03\xb7\x80\x12\x2a\x62\x0e\xaa\x17\xb5\x53\xea\xe3\xbd\x97\xba\x03\x42\xc9\x4e\x50\xf6\xe0\x1e\xb3\x5a\x61\x20\x61\x7a\xc5\x0e\x71\x8e\x3f\x80\xc1\x75\x66\x33\x08\x0e\x3f\xa5\x09\xbd\x48\x21\x99\x92\xe2\xfc\x32\x06\xab\xc8\x1b\x2a\x0c\x90\x2c\xe0\x1d\xe1\xb9\x85\xb5\x6a\xa9\x65\x87\x89\x36\x63\xa8\xee\x80\x38\x81\x9d\x06\x34\x12\x75\x39\xd5\x53\xd2\x51\x6b\x41\x4b\x74\xac\x5b\xed\x12\x6a\xa2\x07\xb2\xa1\xcc\xf6\xa1\x72\x20\xb7\x1c\x55\x8b\xa4\x04\x5d\x9c\x7e\x94\x59\x7e\xa4\x16\x88\x72\x59\x09\x8f\x94\x59\xcf\xfa\xa5\xca\x69\xf8\x4f\xcf\x35\xc4\x4b\x9d\x7e\x42\x35\x8d\x01\x1b\x62\xc8\x3f\x90\x13\x17\xc2\xf9\xaa\xae\xa1\x8e\xb2\x65\x08\x32\xa2\xc1\xf6\x5a\x42\x4d\x76\xe7\x59\x42\x8f\xbf\xde\x40\xd3\x0b\xc2\xe3\x8c\x0f\xeb\x0c\x79\x5d\x70\x59\xc3\x23\xd4\x8e\xab\xf9\xae\x12\xaf\x5d\xea\x0f\x50\x99\x12\x7d\x2b\x9f\x05\xcb\x94\xf8\xfd\xb1\x7a\xb9\x2f\x41\x3b\xd4\x49\xd2\xd2\x07\x78\xe7\xf8\x65\x98\xfe\x79\xe4\x6d\xd6\xd6\xb9\xab\x50\x79\x5c\x11\x72\xa2\x4c\x7e\x89\xef\x7c\x08\xc0\x7c\xf0\x54\x3e\xd8\x61\x73\x83\x20\x78\x33\x14\xf8\xcf\x28\xe0\x2b\xd9\x6e\x89\xe4\x02\x15\x91\x37\x83\x7e\x33\x0a\x4c\xd5\xc5\x57\xe5\x18\xd9\xdb\x11\xe8\x0a\x25\x6b\x6b\xb2\x45\x1d\x56\xde\xa3\x62\x64\xeb\xf4\x5b\xa1\x88\x94\x26\xdb\xd8\x04\x2b\xf4\x0a\xf9\x29\x83\x59\xb2\x8a\xff\x52\x17\xb6\x51\x8d\x50\xda\x67\xc1\xca\xa2\x60\x61\xb2\x1d\x6c\xfd\xbd\x05\xc1\x13\x64\x3b\xf8\x04\x17\xbc\x5e\x33\xd4\x48\xcc\xe6\xc4\x20\xeb\x1b\xfc\xbb\x84\x8b\x86\x56\x1d\xe3\x80\xf1\x4e\x9e\xfb\x4f\x72\x31\x5b\x88\x7b\x6f\x16\x88\xdd\xae\x5f\xc3\x51\xf6\xae\xd1\x48\xee\x6a\x38\xde\xe1\x43\x32\x44\x4c\x68\x5e\xca\xbf\x7d\xfc\x78\x8f\x01\x93\x9c\xb8\xac\xd5\xc9\x24\xd3\xb0\x89\x78\x7c\xf8\xe7\xbb\x64\xc4\xec\x06\x51\x64\x27\x7b\xc6\x92\x9c\x24\xee\xe2\xc7\x4f\x49\xd1\x98\xb3\xb4\xf4\xb1\xc0\x02\x86\x2f\x8a\x7f\x51\x21\xfc\x00\x1e\xad\xa6\x38\x4c\x9b\xe4\x9b\xbb\x55\xa9\xa8\x52\x56\x95\xb7\x15\x49\xdb\x64\xb3\x2a\xe1\xf6\xf6\x19\x19\x49\x61\x6c\xbd\x65\xb7\xb7\x6f\xfe\xf4\x9b\x05\xd6\x6d\x8d\xf4\xfe\xe2\xc6\x4f\x49\xc1\x94\x50\x7a\xab\x9a\xc6\x71\x55\x85\xbb\x9d\xfc\x95\xbb\x1b\x9b\x08\x49\xb3\x54\xa4\x9b\x67\xb4\x52\xbb\x9e\x0b\x27\x63\xaf\xc6\xeb\x53\x32\xce\x16\xf8\x1c\xdc\x70\xc1\xbd\xc6\x0c\xc3\x24\xe6\x15\x9e\x9f\xae\xb4\x5e\x66\xf0\x0b\x3d\x52\x87\x1f\x07\xc3\x3d\x18\xda\xa1\x49\xeb\x2b\x13\xfa\xbc\x5d\x63\x68\x0e\x01\x11\x72\x32\x4c\xf3\xce\x3f\x0d\xf3\x31\x32\xbf\xbf\xa4\x22\x2f\x6f\xf3\x65\x76\x82\x5b\xd0\xd4\x02\xb2\x98\x8d\x83\x7b\xae\x3d\xdc\xe2\x9b\x6f\xb9\x4f\xe7\x9c\x58\xdd\xc3\x02\xe3\x9e\xba\x8e\xd3\x31\xeb\x69\xb8\x0d\x53\x4f\x49\x51\x48\xe5\x7d\xbf\x14\x42\xcb\x60\x25\x47\xd1\xd3\xdb\x53\x32\x8a\x29\x0a\xac\x4c\x3f\xf5\x42\xfc\x83\xda\x83\xf1\x53\xc6\xd6\xaa\xb7\x7e\x8c\x16\x32\x55\x08\xb5\x51\x64\x99\x8a\x9c\xa4\xac\x5c\x96\xc9\x04\x95\x7b\xa4\x57\xbb\x5f\x00\x3b\x06\xf0\x26\x79\x64\xba\x97\x5e\xfe\x40\xf1\xfb\x66\x67\x77\x6e\x04\x7d\x00\xa7\x46\x77\xb6\x07\x25\xfd\x68\x9c\x9d\x85\x60\x59\x54\x7f\x5e\xe6\xd4\x9e\xbb\xf3\x94\x4b\x98\x99\x71\x58\xc3\x31\xa4\x40\x8c\x62\x4c\x83\xa2\xf0\x4d\x74\xe1\xf7\x99\xad\x6b\xba\xe9\x4e\x80\x37\xb9\x06\x6c\x76\xcd\x56\xaa\xeb\x30\x5f\x14\x67\x0e\x4d\xeb\xa4\xf9\xd3\x9b\x1b\xf8\x99\x97\xa6\x9c\x39\xf1\xc6\x3a\x1f\xb9\xd1\xd4\x59\x97\x97\x2b\x8e\x40\xa2\x9a\xea\x13\x97\xf8\x7a\x39\xb6\x67\x12\xd8\x22\xb8\x88\x9f\xe0\xb2\x7f\x5c\x67\x77\xa6\xad\x53\x34\xbe\x47\xf6\xf5\x86\x75\x66\xa7\xda\x0c\xa6\xbd\x16\xe7\xad\xe1\xb8\xfb\xe3\x6a\xf9\x9e\x3e\xc0\x5b\xd5\xb6\x54\xd6\x98\xe9\xde\x8b\x7e\xdf\x2b\xf1\xf6\xd6\xd5\xe0\x40\xfc\x41\xbd\x55\x6d\x27\xc0\xc2\x66\xb6\x0f\x06\xd2\x6c\xd7\x79\xec\xbb\xae\xba\xa7\x47\x08\x5b\xa3\xee\x65\x50\x64\xd7\x95\x7f\xe9\x9b\xf9\x6a\xa6\xa4\xa5\x5c\x9a\xcc\xb7\x5e\x20\x00\xcf\x8d\x7e\x2d\x9e\x29\x1e\x72\x72\x24\x5c\x92\x8e\x72\xed\x89\x36\xa4\x56\xe3\x7e\xc9\x1b\x72\xc4\xed\x34\xac\x9b\x6e\xa6\x4e\xbe\x6b\x29\x9d\x69\xc7\x79\x44\x10\xdf\x03\x8d\xef\x3f\x66\xdd\xc1\x05\x3e\x62\xbf\x6c\xf6\x0d\xb6\x17\xbb\xbe\xa9\x7e\xe2\x02\x3e\x9d\x3b\x98\xb4\x02\xee\xc4\xea\xde\x97\x58\x6c\xe2\x26\x81\xeb\xd0\xe9\x75\xd4\x1e\xca\xbf\x72\x9d\xe1\x43\xf0\xcc\x92\xc6\xae\x0f\x99\x28\x3d\x20\x18\x7a\x28\xc4\xb2\x25\xc7\xf2\xaa\x7f\x44\xeb\x8c\xbd\xd6\x95\x69\x2e\x0c\x8c\xd5\x5c\xee\x4b\xf7\x98\x35\x36\x8f\x78\x6d\x26\x56\x9b\x41\x38\x50\x83\xdd\xcc\xc5\x89\xc7\x12\x5b\xe9\xb8\xd7\xd9\xc4\x60\xf0\xe0\xe9\xd7\x50\x59\x93\x63\xd4\x3b\x3e\x03\x6e\xda\x16\x0e\x3e\x0b\x1c\x2f\xdc\x90\xf7\xaf\xe6\x38\xd3\x2b\x74\xd2\x51\xcf\x1b\x1c\x43\xf5\xfe\xe2\x9a\xa3\xeb\xb8\x27\x9e\xc1\x1f\x4e\x7e\x7e\xf8\xea\x3b\xf1\x6a\x6f\xfa\x5d\x96\xa4\x29\x6e\x2a\xce\xd1\xe3\x0c\x26\x57\xcd\xf5\x8a\x81\x79\x33\x02\xbe\xd2\x04\x63\x02\xe3\x31\x77\xb1\x52\x46\xa7\x9a\x63\x39\x39\xd7\x1c\xcb\xf1\x04\x73\x2c\x27\x67\x98\x79\x1a\x4c\xa3\x5e\x49\x97\xc1\x43\x46\x5f\xe7\xf0\x77\xb2\xe6\x02\xd0\x87\xef\xfa\xc9\x0b\xf1\xf9\xe3\x55\x28\x1e\x7d\x53\xbd\x15\x40\xf5\x7b\xff\x01\xc5\x64\xa1\x22\x0d\xb5\xcb\xd5\xfd\xf2\xef\x6a\x77\xdf\xd1\x93\xcc\x22\xbe\x49\x12\xfe\x42\x09\x53\xf2\xc7\x47\xd7\xa6\x4c\x80\xac\x4a\x9f\x5b\x00\x17\x67\x7e\xf3\x7a\x29\x8b\x4b\x00\xb9\x23\x36\x26\x56\x27\x22\x2e\xc9\x17\x39\xa8\x11\xbe\x71\xc2\x1e\x1e\xa7\x27\xb1\x49\xc0\x24\x59\x59\x16\x9b\xe4\x12\x33\x6e\x03\xc8\xd2\xfa\x36\x9e\x64\x4b\x93\xad\x5f\x8e\x73\x63\x65\xf9\x77\xee\x1a\x3e\x2e\x09\x1f\x8b\x0b\x4c\x03\xb8\x28\xc8\x27\xcd\x5b\x7f\x92\x33\x1d\x65\x93\x03\x19\xd6\x34\xbc\x55\xbe\x52\x24\x3f\xa7\xe6\x15\xca\x48\xcd\xab\x3f\x24\x93\x4c\x0f\x15\xa5\xe1\xb2\x76\x52\x72\xaf\xeb\x66\x21\x98\xc7\x82\xe9\x2c\x8c\xa7\x74\x25\x72\xd2\x9a\xfd\xbc\x30\xc5\x7c\x16\x58\x1c\xa8\x61\x0a\x4f\x4e\x93\x5a\x1f\x55\x9e\x18\xd3\xc4\x87\xce\x86\x0b\xd0\xf0\x37\x72\x9d\x16\x8d\xe1\xe7\x61\x32\x25\x26\x6f\xe2\x22\x15\x00\xec\xa8\x01\x3c\x4b\x66\xc3\x9e\xb0\xc1\x9a\x3d\xce\xba\xd2\xb0\x8c\x20\x7c\x9f\xf6\x92\xf0\x18\x3a\x27\xf0\x65\x10\x51\x2e\xae\xbf\xf0\x68\x8d\xa5\x3a\xec\x5b\x0d\xe8\xf2\x9d\x62\x99\x55\xfe\x9b\x4d\xc6\x94\x28\xde\xdc\xba\x40\xce\xc9\x38\x8b\x36\x2f\xde\xdc\x62\x94\x6f\x36\xcf\xb1\x06\x59\xaf\x33\xfe\x15\x6c\x83\xbe\x81\xe1\x07\x38\x85\x82\x30\xd6\x03\x17\x22\x79\xd0\x29\x77\x00\xf2\x81\xfc\xfd\xa7\x1f\xd1\xbf\xd7\x9c\x61\xc9\x87\xcf\x89\xfb\xc1\xbe\xe3\xf2\x4a\xe8\x44\x0f\xaf\xc5\x0b\x64\xcf\x82\x82\x84\x72\xf7\x43\x5d\x0f\xba\x21\x8a\xcd\x6a\x24\xad\xd7\x6b\x5f\x66\x8c\xd5\x39\x31\xd0\x6d\x26\x15\xc6\xf4\xc2\x5e\xf6\xb2\x69\xdd\xc9\x92\xec\xf3\xcf\xa9\xf9\xea\x2a\x87\xcf\x86\x6c\x64\x80\x15\x03\x28\x3b\x60\xbd\x30\x56\x57\x7b\x9f\x85\x21\x8f\xa3\x9a\x61\xb1\xe9\x2c\xb9\x34\xa0\x6d\xe6\x05\xe6\x6e\xe5\x66\xa9\xcb\xf2\x04\x33\x05\xa6\x79\x10\x21\x35\xd0\xb9\xef\x29\xff\xef\x77\x94\xb0\xee\xcb\x97\x64\x82\xc1\x33\x75\xff\x17\x19\x8b\x8b\xab\x98\xbe\xfe\x24\x59\xf9\x2a\x21\x65\xe9\x96\x97\x25\x49\x36\x59\xf9\x6a\xe3\xfa\xe9\x3f\x26\x93\x5d\xcf\xfd\x63\x01\xb9\xfe\x2f\x00\x00\xff\xff\xe6\x74\x28\x8b\xad\x1a\x00\x00"
 
 func runtimePluginsLinterLinterLuaBytes() ([]byte, error) {
        return bindataRead(
index c208820ab5433c1df66ca1fe9b6fb32b52c96405..ad018c6337272e4fc519ee5580a9760b671ab987 100644 (file)
@@ -483,6 +483,14 @@ func (w *BufWindow) displayBuffer() {
                                        }
                                }
 
+                               for _, m := range b.Messages {
+                                       if bloc.GreaterEqual(m.Start) && bloc.LessThan(m.End) ||
+                                               bloc.LessThan(m.End) && bloc.GreaterEqual(m.Start) {
+                                               style = style.Underline(true)
+                                               break
+                                       }
+                               }
+
                                if r == '\t' {
                                        if s, ok := config.Colorscheme["indent-char"]; ok {
                                                style = s
index a4cac3f09ee03db4e1bebf3f247eacf654059005..e59699813483f6c9b2d0a9bdb6985561e3177f81 100644 (file)
@@ -18,14 +18,20 @@ local linters = {}
 -- errorformat: how to parse the linter/compiler process output
 --     %f: file, %l: line number, %m: error/warning message
 -- os: list of OSs this linter is supported or unsupported on
---     optional param, default: []
+--     optional param, default: {}
 -- whitelist: should the OS list be a blacklist (do not run the linter for these OSs)
--- or a whitelist (only run the linter for these OSs)
+--            or a whitelist (only run the linter for these OSs)
 --     optional param, default: false (should blacklist)
 -- domatch: should the filetype be interpreted as a lua pattern to match with
--- the actual filetype, or should the linter only activate on an exact match
+--          the actual filetype, or should the linter only activate on an exact match
 --     optional param, default: false (require exact match)
-function makeLinter(name, filetype, cmd, args, errorformat, os, whitelist, domatch)
+-- loffset: line offset will be added to the line number returned by the linter
+--          useful if the linter returns 0-indexed lines
+--     optional param, default: 0
+-- coffset: column offset will be added to the col number returned by the linter
+--          useful if the linter returns 0-indexed columns
+--     optional param, default: 0
+function makeLinter(name, filetype, cmd, args, errorformat, os, whitelist, domatch, loffset, coffset)
     if linters[name] == nil then
         linters[name] = {}
         linters[name].filetype = filetype
@@ -35,6 +41,8 @@ function makeLinter(name, filetype, cmd, args, errorformat, os, whitelist, domat
         linters[name].os = os or {}
         linters[name].whitelist = whitelist or false
         linters[name].domatch = domatch or false
+        linters[name].loffset = loffset or 0
+        linters[name].coffset = coffset or 0
     end
 end
 
@@ -48,24 +56,24 @@ function init()
         devnull = "NUL"
     end
 
-    makeLinter("gcc", "c", "gcc", {"-fsyntax-only", "-Wall", "-Wextra", "%f"}, "%f:%l:%d+:.+: %m")
-    makeLinter("gcc", "c++", "gcc", {"-fsyntax-only","-std=c++14", "-Wall", "-Wextra", "%f"}, "%f:%l:%d+:.+: %m")
+    makeLinter("gcc", "c", "gcc", {"-fsyntax-only", "-Wall", "-Wextra", "%f"}, "%f:%l:%c:.+: %m")
+    makeLinter("gcc", "c++", "gcc", {"-fsyntax-only","-std=c++14", "-Wall", "-Wextra", "%f"}, "%f:%l:%c:.+: %m")
     makeLinter("dmd", "d", "dmd", {"-color=off", "-o-", "-w", "-wi", "-c", "%f"}, "%f%(%l%):.+: %m")
     makeLinter("gobuild", "go", "go", {"build", "-o", devnull}, "%f:%l: %m")
-    makeLinter("golint", "go", "golint", {"%f"}, "%f:%l:%d+: %m")
+    makeLinter("golint", "go", "golint", {"%f"}, "%f:%l:%c: %m")
     makeLinter("javac", "java", "javac", {"-d", "%d", "%f"}, "%f:%l: error: %m")
     makeLinter("jshint", "javascript", "jshint", {"%f"}, "%f: line %l,.+, %m")
     makeLinter("literate", "literate", "lit", {"-c", "%f"}, "%f:%l:%m", {}, false, true)
-    makeLinter("luacheck", "lua", "luacheck", {"--no-color", "%f"}, "%f:%l:%d+: %m")
-    makeLinter("nim", "nim", "nim", {"check", "--listFullPaths", "--stdout", "--hints:off", "%f"}, "%f.%l, %d+. %m")
-    makeLinter("clang", "objective-c", "xcrun", {"clang", "-fsyntax-only", "-Wall", "-Wextra", "%f"}, "%f:%l:%d+:.+: %m")
+    makeLinter("luacheck", "lua", "luacheck", {"--no-color", "%f"}, "%f:%l:%c: %m")
+    makeLinter("nim", "nim", "nim", {"check", "--listFullPaths", "--stdout", "--hints:off", "%f"}, "%f.%l, %c. %m")
+    makeLinter("clang", "objective-c", "xcrun", {"clang", "-fsyntax-only", "-Wall", "-Wextra", "%f"}, "%f:%l:%c:.+: %m")
     makeLinter("pyflakes", "python", "pyflakes", {"%f"}, "%f:%l:.-:? %m")
     makeLinter("mypy", "python", "mypy", {"%f"}, "%f:%l: %m")
     makeLinter("pylint", "python", "pylint", {"--output-format=parseable", "--reports=no", "%f"}, "%f:%l: %m")
-    makeLinter("shfmt", "shell", "shfmt", {"%f"}, "%f:%l:%d+: %m")
-    makeLinter("switfc", "swift", "xcrun", {"swiftc", "%f"}, "%f:%l:%d+:.+: %m", {"darwin"}, true)
-    makeLinter("switfc", "swiftc", {"%f"}, "%f:%l:%d+:.+: %m", {"linux"}, true)
-    makeLinter("yaml", "yaml", "yamllint", {"--format", "parsable", "%f"}, "%f:%l:%d+:.+ %m")
+    makeLinter("shfmt", "shell", "shfmt", {"%f"}, "%f:%l:%c: %m")
+    makeLinter("swiftc", "swift", "xcrun", {"swiftc", "%f"}, "%f:%l:%c:.+: %m", {"darwin"}, true)
+    makeLinter("swiftc", "swiftc", {"%f"}, "%f:%l:%c:.+: %m", {"linux"}, true)
+    makeLinter("yaml", "yaml", "yamllint", {"--format", "parsable", "%f"}, "%f:%l:%c:.+ %m")
 
     config.MakeCommand("lint", "linter.lintCmd", config.NoComplete)
 end
@@ -109,7 +117,7 @@ function runLinter(buf)
         end
 
         if ftmatch then
-            lint(buf, k, v.cmd, args, v.errorformat)
+            lint(buf, k, v.cmd, args, v.errorformat, v.loffset, v.coffset)
         end
     end
 end
@@ -119,23 +127,35 @@ function onSave(bp)
     return false
 end
 
-function lint(buf, linter, cmd, args, errorformat)
+function lint(buf, linter, cmd, args, errorformat, loff, coff)
     buf:ClearMessages("linter")
 
-    shell.JobSpawn(cmd, args, "", "", "linter.onExit", buf, linter, errorformat)
+    shell.JobSpawn(cmd, args, "", "", "linter.onExit", buf, linter, errorformat, loff, coff)
 end
 
-function onExit(output, buf, linter, errorformat)
+function onExit(output, buf, linter, errorformat, loff, coff)
     local lines = split(output, "\n")
 
-    local regex = errorformat:gsub("%%f", "(..-)"):gsub("%%l", "(%d+)"):gsub("%%m", "(.+)")
+    local regex = errorformat:gsub("%%f", "(..-)"):gsub("%%l", "(%d+)"):gsub("%%c", "(%d+)"):gsub("%%m", "(.+)")
     for _,line in ipairs(lines) do
         -- Trim whitespace
         line = line:match("^%s*(.+)%s*$")
         if string.find(line, regex) then
-            local file, line, msg = string.match(line, regex)
+            local file, line, col, msg = string.match(line, regex)
+            local hascol = true
+            if not string.find(errorformat, "%%c") then
+                hascol = false
+                msg = col
+            end
             if basename(buf.Path) == basename(file) then
-                local bmsg = buffer.NewMessageAtLine("linter", msg, tonumber(line), buffer.MTError)
+                local bmsg = nil
+                if hascol then
+                    local mstart = buffer.Loc(tonumber(col-1+coff), tonumber(line-1+loff))
+                    local mend = buffer.Loc(tonumber(col+coff), tonumber(line-1+loff))
+                    bmsg = buffer.NewMessage("linter", msg, mstart, mend, buffer.MTError)
+                else
+                    bmsg = buffer.NewMessageAtLine("linter", msg, tonumber(line+loff), buffer.MTError)
+                end
                 buf:AddMessage(bmsg)
             end
         end