I think this might be bad and I should feel bad.
But could someone tell me if this is crazy for a completions plugin?
Specifically the part where I add "<" (less than sign) into the array using for item in html.
[pre=#141414] if ch != '<':
html = ((list(item)-2],"<" + list(item)1]) for item in html])[/pre]
I'm just covering my bases since a lot of folks are using this plugin I'd hate to have to revert these changes later.
Here is the plugin example:
def on_query_completions(self, view, prefix, locations):
- #* restrict scope somewhere here
- * array list tags etc...
pt = locations0] - len(prefix) - 1
ch = view.substr(sublime.Region(pt, pt + 1))
if ch != '<':
html = ((list(item)-2],"<" + list(item)1]) for item in html])
return html, sublime.INHIBIT_WORD_COMPLETIONS | sublime.INHIBIT_EXPLICIT_COMPLETIONS[/pre]
Thanks in advance!