Commit 99cfa771 authored by Jérome Perrin's avatar Jérome Perrin

slaprunner: Quick and dirty support for ace editor autocompletion

parent 4bbc4028
...@@ -45,6 +45,7 @@ define('ace/mode/buildout', function(require, exports, module) { ...@@ -45,6 +45,7 @@ define('ace/mode/buildout', function(require, exports, module) {
var Mode = function() { var Mode = function() {
this.$tokenizer = new Tokenizer(new BuildoutHighlightRules().getRules()); this.$tokenizer = new Tokenizer(new BuildoutHighlightRules().getRules());
this.$highlightRules = []; // workaround for bug with autocomplete
}; };
oop.inherits(Mode, TextMode); oop.inherits(Mode, TextMode);
......
...@@ -71,6 +71,8 @@ $(document).ready(function () { ...@@ -71,6 +71,8 @@ $(document).ready(function () {
var mode = modelist.getModeForPath(file); var mode = modelist.getModeForPath(file);
editor.session.modeName = mode.name; editor.session.modeName = mode.name;
editor.session.setMode(mode.mode); editor.session.setMode(mode.mode);
ace.require("ace/ext/language_tools");
editor.setOptions({ enableBasicAutocompletion: true });
editor.session.getUndoManager().reset(); editor.session.getUndoManager().reset();
editorlist[hash].busy = false; editorlist[hash].busy = false;
status = true; status = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment