@@ -13,6 +13,31 @@ module.exports =
1313 title : ' Explicit Variables'
1414 default : ' false'
1515 description : ' Get errors on undeclared variables'
16+ lcCompilePath :
17+ type : ' string'
18+ title : ' Compiler Path For LiveCode Builder'
19+ default : switch
20+ when process .platform == ' darwin'
21+ then ' ~/livecode/_build/mac/Debug/lc-compile'
22+ when process .platform == ' linux'
23+ then ' ~/livecode/build-linux-x86_64/livecode/out/Debug/lc-compile'
24+ when process .platform == ' win32'
25+ then ' ~/livecode/_build/Win32/Debug/lc-compile.exe'
26+ description : ' Where is your lc-compile installed? ' +
27+ ' Default assumes it\' s on $PATH'
28+ modulePaths :
29+ type : ' string'
30+ title : ' Module Paths For LiveCode Builder'
31+ default : switch
32+ when process .platform == ' darwin'
33+ then ' ~/livecode/_build/mac/Debug/modules/lci/'
34+ when process .platform == ' linux'
35+ then ' ~/livecode/build-linux-x86_64/livecode/out/Debug/modules/lci/'
36+ when process .platform == ' win32'
37+ then ' ~/livecode/_build/Win32/Debug/modules/lci/'
38+ description : ' Where are the modules installed? ' +
39+ ' Default is where they should be after building ' +
40+ ' a debug build of LiveCode. Delimit paths with `;`.'
1641
1742 activate : ->
1843 @subscriptions = new CompositeDisposable
@@ -22,6 +47,12 @@ module.exports =
2247 @subscriptions .add atom .config .observe ' language-livecode.explicitVars' ,
2348 (explicitVars ) =>
2449 @explicitVars = explicitVars
50+ @subscriptions .add atom .config .observe ' language-livecode.lcCompilePath' ,
51+ (lcCompilePath ) =>
52+ @lcCompilePath = lcCompilePath
53+ @subscriptions .add atom .config .observe ' language-livecode.modulePaths' ,
54+ (modulePaths ) =>
55+ @modulePaths = modulePaths
2556 path = require ' path'
2657 @linterPath = path .join (__dirname , ' ..' , ' tools' , ' Linter.lc' )
2758 @notified = false
@@ -31,7 +62,7 @@ module.exports =
3162
3263 provideLinter : ->
3364 provider =
34- grammarScopes : [' source.livecodescript' , ' source.iRev ' ]
65+ grammarScopes : [' source.livecodescript' , ' source.lcb ' ]
3566 scope : ' file'
3667 lintOnFly : true
3768 lint : (textEditor ) =>
@@ -44,6 +75,12 @@ module.exports =
4475 parameters .push (scope)
4576 explicitVariables = ' -explicitVariables=' + @explicitVars
4677 parameters .push (explicitVariables)
78+ lcCompile = ' -lcCompile=' + @lcCompilePath
79+ parameters .push (lcCompile)
80+ lcCompileModulePaths = ' -modulePaths=' + @modulePaths
81+ parameters .push (lcCompileModulePaths)
82+ editorFilePath = ' -filepath=' + filePath
83+ parameters .push (editorFilePath)
4784 text = textEditor .getText ()
4885 return @ exec (command, parameters, {stdin : text}).then (output) ->
4986 regex = / (\d + ),(\d + ),(. * )/ g
0 commit comments