WIP: needs commit splitting #2419
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
Update electron and Clojurescript
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
from: CodeMirror.Pos(cur.line, token.start), | ||
to: CodeMirror.Pos(cur.line, token.end) | ||
}; | ||
if (found.length) return {list: found, from: from, to: to}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'from' used out of scope.
var found = []; | ||
for (var i = 0; i < options.words.length; i++) { | ||
var word = options.words[i]; | ||
if (word.slice(0, token.string.length) == token.string) | ||
if (word.slice(0, term.length) == term) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'term' used out of scope.
if (token.string && /\w/.test(token.string[token.string.length - 1])) { | ||
var term = token.string, from = CodeMirror.Pos(cur.line, token.start); | ||
} else { | ||
var term = "", from = to; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'from' is already defined.
'term' is already defined.
return CodeMirror.hint.anyword(cm, options); | ||
return function(cm, options) { return CodeMirror.hint.anyword(cm, options) } | ||
} else { | ||
return function() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
} else if (CodeMirror.hint.anyword) { | ||
return CodeMirror.hint.anyword(cm, options); | ||
return function(cm, options) { return CodeMirror.hint.anyword(cm, options) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
resolved.async = true | ||
} else { | ||
resolved = function(cm, options) { | ||
var app = applicableHelpers(cm, helpers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
} | ||
run(0) | ||
} | ||
resolved.async = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
} | ||
} | ||
run(0) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
else run(i + 1) | ||
} | ||
} | ||
run(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
} else { | ||
var result = helper(cm, options) | ||
if (result) callback(result) | ||
else run(i + 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
Hound's review should be ignored here as the CM addons are pulled from |
This pull request introduces 2 alerts when merging 88a7445 into 6a4f68b - view on LGTM.com new alerts:
Comment posted by LGTM.com |
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
}, options) | ||
} else { | ||
var result = helper(cm, options) | ||
if (result) callback(result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
else run(i + 1) | ||
}, options) | ||
} else { | ||
var result = helper(cm, options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'result' is already defined.
Missing semicolon.
helper(cm, function(result) { | ||
if (result) callback(result) | ||
else run(i + 1) | ||
}, options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
if (helper.async) { | ||
helper(cm, function(result) { | ||
if (result) callback(result) | ||
else run(i + 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
var helper = app[i] | ||
if (helper.async) { | ||
helper(cm, function(result) { | ||
if (result) callback(result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
var result = [] | ||
for (var i = 0; i < helpers.length; i++) | ||
if (helpers[i].supportsSelection) result.push(helpers[i]) | ||
return result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
if (!cm.somethingSelected()) return helpers | ||
var result = [] | ||
for (var i = 0; i < helpers.length; i++) | ||
if (helpers[i].supportsSelection) result.push(helpers[i]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
var helpers = cm.getHelpers(cm.getCursor(), "hint"), words; | ||
function applicableHelpers(cm, helpers) { | ||
if (!cm.somethingSelected()) return helpers | ||
var result = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
CodeMirror.registerHelper("hint", "auto", function(cm, options) { | ||
var helpers = cm.getHelpers(cm.getCursor(), "hint"), words; | ||
function applicableHelpers(cm, helpers) { | ||
if (!cm.somethingSelected()) return helpers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
if (editor[prop] !== undefined) out[prop] = editor[prop]; | ||
if (options) for (var prop in options) | ||
if (options[prop] !== undefined) out[prop] = options[prop]; | ||
if (out.hint.resolve) out.hint = out.hint.resolve(cm, pos) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
This pull request introduces 2 alerts when merging 231602d into 6a4f68b - view on LGTM.com new alerts:
Comment posted by LGTM.com |
This is in nascent condition and will be susceptible to a lot of changes.
This PR can even be pointless.