前言
在安装完luacheck,修改sublimelinter配置之后,lua/luacheck也对nginx.conf文件进行检查,给出错误提示,有点难受,决定干掉他。
一、从配置入手
SublimeLinter 找到的资料
二、解决方案
在SublimeLinter Settings - User增加如下配置
"linters": {
"lua": {
"@disable": false,
"args": [],
"excludes": ["*/nginx.conf"]
},
"luacheck": {
"@disable": false,
"args": "--ignore 631 621 614 611 111 612 113 211",
"excludes": ["*/nginx.conf"],
"ignore" : "",
},
"luaglobals": {
"@disable": false,
"args": [],
"excludes": ["*/nginx.conf"]
}
},
总结
这种方法也可以屏蔽其他类文件,强迫症福音。