@@ -215,10 +215,10 @@ function! PSCIDEstart(silent)
215215
216216 let dir = purescript#ide#utils#findRoot ()
217217 if empty (dir )
218- echom " No psc-package.json or bower.json found, couldn't start `purs ide server`"
218+ echom " No psc-package.json, bower.json or spago.dhall found, couldn't start `purs ide server`"
219219 return
220220 endif
221-
221+
222222 let command = [
223223 \ " purs" , " ide" , " server" ,
224224 \ " -p" , g: psc_ide_server_port ,
@@ -227,10 +227,16 @@ function! PSCIDEstart(silent)
227227 \ " bower_components/**/*.purs" ,
228228 \ ]
229229
230+ if executable (" spago" )
231+ let fullCommand = command + systemlist (" spago sources" )
232+ else
233+ let fullCommand = command
234+ endif
235+
230236 exe " lcd" dir
231- call purescript#ide#utils#debug (" PSCIDEstart: " . json_encode (command ), 3 )
237+ call purescript#ide#utils#debug (" PSCIDEstart: " . json_encode (fullCommand ), 3 )
232238 let jobid = purescript#job#start (
233- \ command ,
239+ \ fullCommand ,
234240 \ { " on_stderr" : { ch , msg - > purescript#ide#utils#warn (purescript#ide#utils#toString (msg), v: true ) }
235241 \ , " on_stdout" : { ch , msg - > type (msg) == v: t_string ? purescript#ide#utils#log (msg) : v: null }
236242 \ , " on_exit" : function (" s:onServerExit" )
@@ -286,7 +292,7 @@ function! s:projectProblems()
286292 let problems = []
287293
288294 if empty (rootdir)
289- call add (problems, " Your project is missing a bower.json or psc-package.json file" )
295+ call add (problems, " Your project is missing a bower.json, psc-package.json or spago.dhall file" )
290296 elseif g: psc_ide_check_output_dir == 1
291297 let outputcontent = s: globpath (rootdir, " output/*" )
292298 if len (outputcontent) == 0
0 commit comments