From 664fc08e8e57b32763fd967ce1994e57e3bec047 Mon Sep 17 00:00:00 2001 From: Christian Kosmowski Date: Sat, 12 Aug 2017 10:49:25 +0200 Subject: [PATCH] Added 'includeOrigins' configuration option --- addon/tern/tern.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addon/tern/tern.js b/addon/tern/tern.js index 644e495f65..868dd21fe1 100644 --- a/addon/tern/tern.js +++ b/addon/tern/tern.js @@ -29,6 +29,8 @@ // queries. // * responseFilter: A function(doc, query, request, error, data) that // will be applied to the Tern responses before treating them +// * includeOrigins: A boolean that indicate weather or not the +// Tern responses should include the origin files in its responses // // // It is possible to run the Tern server in a web worker by specifying @@ -205,7 +207,7 @@ // Completion function hint(ts, cm, c) { - ts.request(cm, {type: "completions", types: true, docs: true, urls: true}, function(error, data) { + ts.request(cm, {type: "completions", types: true, docs: true, urls: true, origins: ts.options.includeOrigins}, function(error, data) { if (error) return showError(ts, cm, error); var completions = [], after = ""; var from = data.start, to = data.end;