   loadDeps: (editor) ->
     res = XRegExp.exec(editor.getText(), /^module (\S+) where/)
     if res
-      @runCmd "dependencies #{res[1]}"
+      @runCmd
+        command: "load"
+        params:
+          dependencies: [res[1]]
     else
       Promise.resolve()
 

  constructor: ->
    @startServer()

  runCmd: (str) ->
    return new Promise (resolve,reject) =>
      command = @pscIde
      args = ['-p', @pscIdePort]
      stdout = (output) =>
        console.debug "psc-ide", str, "-->", output
        resolve (@trimQuote output).trim()
      exit = (code) =>
        console.debug "exited with code #{code}"
        reject code if code is not 0
      bp = new BufferedProcess({command,args,stdout,exit})
      bp.process.stdin.write str + '\n'

  startServer: ->
    # should watch these and restart

        @getCompletion(prefix,@editors.activeModules)
          .then (completions) =>
            resolve completions.map (c) =>
              text: c.identifier
              displayText: c.identifier + ": " + @abbrevType c.type
              description: c.type
              type: if /->/.test(c.type) then "function" else "value"

