Posts

Showing posts with the label Autocomplete

ACE Editor Autocomplete - Custom Strings

Answer : you need to add a completer like this var staticWordCompleter = { getCompletions: function(editor, session, pos, prefix, callback) { var wordList = ["foo", "bar", "baz"]; callback(null, wordList.map(function(word) { return { caption: word, value: word, meta: "static" }; })); } } langTools.setCompleters([staticWordCompleter]) // or editor.completers = [staticWordCompleter] If you want to persist the old keyword list and want to append a new list var staticWordCompleter = { getCompletions: function(editor, session, pos, prefix, callback) { var wordList = ["foo", "bar", "baz"]; callback(null, [...wordList.map(function(word) { return { caption: word, value: word, meta: "static" }; }), ...ses...

Atom JavaScript Autocomplete

Answer : Since JavaScript is loosely coupled, providing a working autocomplete solution is not as easy as for statically typed languages like Java. Your best bets with Atom are the following packages: autocomplete-plus - this is now bundled with Atom as the default autocomplete provider ternjs - this looks pretty good, but requires some configuration. I suggest you give these a try. I think you should go for atom-ternjs This is java script intelligence for atom You need to change(Enable) setting for atom-ternjs Use autocomplete-snippets Display both autocomplete-snippets and function name and many more depends on your requirements ...