本项目来自主要代码来自 FormatLua,经过该项目作者同意使用MIT协议使用到atom package。
on linux system , you can use command which lua5.1
,if result like /usr/bin/lua5.1
,it's can work.
you should be set this value in config.cson
"atom-format-lua":lua51: "/usr/bin/lua5.1"
if windows7/8/10.I haven't windows system,so I don't know where is lua5.1, maybe the path like C:\\xx\\xx\\lua5.1.exe
"atom-format-lua":lua51: "c:\program file\lua\bin\lua5.1.exe"
It's my error.
在设置 formatter.lua 工作环境变量的时候取值如下,之前测试的时候没有发现问题,因为我就是在atom-format-lua
包里测试的,能正常的工作。
wkspc=path.resolve('./luacode')
但是后来发现,换到其他的工作目录之后,上面方式取到的路径是当前工作目录的路径,所以这个插件使用的时候是报错的,在这之前完全没有正常工作。
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.