thlorenz / brace

📔 browserify compatible version of the ace editor.
http://thlorenz.github.io/brace/
MIT License
1.06k stars 304 forks source link

About AutoCompletion #181

Open zhouyusd opened 3 years ago

zhouyusd commented 3 years ago
var langTools = window.ace.acequire("ace/ext/language_tools");
var flowCompleter = {
      getCompletions: function (editor, session, pos, prefix, callback) {

          callback(null, [
              {
                  caption: 'include',
                  meta: 'keyword',
                  value: 'include',
               }
           ])
       }
}
langTools.addCompleter(flowCompleter);

I added some keywords I want to distinguish between languages. What should I do