This PR adds two new features to the built-in completer:
Extract the list of keywords from a language definition and add them to the completer’s keywords. This would, for example, allow auto-completion of Python exceptions, built-ins and keywords.
Let the user define an additional set of completions. This is especially useful if you have an editor for keyword-less languages with a fixed structure, e.g. YAML files for Ansible or Travis (qpart.setCustomCompletions({'sudo', 'addons', 'sources', 'matrix', 'os'})).
Both sets of completions are managed independently (from another and from the completions derived from the current document). So the custom completions “survive” if you change the language definition or the change of the entire document. You can also reset the custom completions at any time (qpart.setCustomCompletions(set())).
This PR adds two new features to the built-in completer:
Extract the list of keywords from a language definition and add them to the completer’s keywords. This would, for example, allow auto-completion of Python exceptions, built-ins and keywords.
Let the user define an additional set of completions. This is especially useful if you have an editor for keyword-less languages with a fixed structure, e.g. YAML files for Ansible or Travis (
qpart.setCustomCompletions({'sudo', 'addons', 'sources', 'matrix', 'os'})
).Both sets of completions are managed independently (from another and from the completions derived from the current document). So the custom completions “survive” if you change the language definition or the change of the entire document. You can also reset the custom completions at any time (
qpart.setCustomCompletions(set())
).