Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 'includeOrigins' configuration option #4907

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion addon/tern/tern.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down