code: function (args, callback) {
          if (ternserver) {
            ternserver.request({
                query: {
                  type: "completions",  //$NON-NLS-1$
                  file: args.meta.location,
                  types: true,
                  origins: true,
                  urls: true,
                  docs: true,
                  end: args.params.offset,
                  sort: true,
                  filter: false,
                  ecma: args.params.ecma,
                  expandWordForward: false,
                  omitObjectPrototype: false,
                  includeKeywords: args.params.keywords,
                  includeTemplates: args.params.template,
                  caseInsensitive: true,
                  docFormat: "full" //$NON-NLS-1$
                },
                files: args.files
              },
              function (error, comps) {
                if (error) {
                  callback({
                    request: 'completions',
                    proposals: [],
                    error: error.message,
                    message: Messages['failedToComputeProposals']
                  }); //$NON-NLS-1$
                } else if (comps && comps.completions) {
                  callback({request: 'completions', proposals: comps.completions}); //$NON-NLS-1$
                } else {
                  callback({request: 'completions', proposals: []}); //$NON-NLS-1$
                }
              });
  
          } else {
            callback({request: 'completions', message: Messages['failedToComputeProposalsNoServer']}); //$NON-NLS-1$
          }
        }
docs: /* completions message handler