Reputation: 1043
how could I set up individual completers per ace editor instance?
I am using multiple editors in my application. - setting completers on the languageTools object seems to just add duplicates for all editor instances at once
langTools.addCompleter(myCompleter);
setting completers directly on the editor seems to produce the same result.
editor.completers.push(myCompleter);
(All editors should keep their default completers)
Upvotes: 3
Views: 740
Reputation: 1043
In my second example, the completers were handed by reference, so I was always adding completers to the central list of completers, which ended up in duplicates.
This works:
editor.completers = editor.completers.slice();
editor.completers.push(myCompleter);
Upvotes: 7