diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js index cad80605..dac2075c 100644 --- a/lib/ace/ext/language_tools.js +++ b/lib/ace/ext/language_tools.js @@ -67,8 +67,14 @@ var snippetCompleter = { } }; -exports.removeCompleters = function() { - completers = []; +// Allows default completers to be removed or replaced with a explict set of completers +// A null argument here will result in an empty completer array, not a null attribute +exports.setCompleters = function(val) { + if (val == null || val == undefined || (!(val instanceof Array)) ) { + completers = []; + } else { + completers = val; + } }; var completers = [snippetCompleter, textCompleter, keyWordCompleter];