Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocompletion for filter text fields and text areas #14

Merged
merged 14 commits into from
Jul 21, 2024

Conversation

Bios-Marcel
Copy link
Owner

@Bios-Marcel Bios-Marcel commented Jul 19, 2024

Todos:

  • Preserve newlines when autocompleting
  • Offer autocompletion directly after open paranthesis
  • Offer autocompletion for binary operators (Could be difficult)
  • Simplify usage of api
  • Make sure popup doesn't render out of bounds
  • Do a lookahead on completion to prevent accidentally recompleting an existing word partially
  • Properly handle selection
  • Use input.insert where possible instead of setText
  • Make completion independent of content type to complete

    Currently it contains logic specific to the filter language

  • Add indicator of whether the query is valid
  • 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.

@Bios-Marcel Bios-Marcel changed the title Add initial version for autocompletion in text fields and text areas Autocompletion for filter text fields and text areas Jul 20, 2024
@Bios-Marcel Bios-Marcel merged commit e21fa0e into master Jul 21, 2024
1 check passed
@Bios-Marcel Bios-Marcel deleted the wip_autocomplete branch July 21, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant