[x] Offer autocompletion directly after open paranthesis
[x] Offer autocompletion for binary operators (Could be difficult)
[x] Simplify usage of api
[x] Make sure popup doesn't render out of bounds
[x] Do a lookahead on completion to prevent accidentally recompleting an existing word partially
[x] Properly handle selection
[x] Use input.insert where possible instead of setText
[x] Make completion independent of content type to complete
Currently it contains logic specific to the filter language
[x] Add indicator of whether the query is valid
[x] ~Fuzzy autocomplete~ Will be a separate issue after the PR
Imperfections I'll accept for now:
Y out of bounds isn't treated
Binary operators aren't autocompleted correctly.
The completion is a hack implemented outside of the parser. We can only do full completion, not partial completion, due to the fact we don't run into the binaryExpression rule of the parser. I tried changing the parser, but to no success.
A solution to any parsing problems is potentially throwing away antlr and writing a custom parser.
Todos:
Imperfections I'll accept for now:
A solution to any parsing problems is potentially throwing away antlr and writing a custom parser.