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

Code Completion: Respect completion context #37

Open
6 tasks
obiwan87 opened this issue May 14, 2024 · 0 comments
Open
6 tasks

Code Completion: Respect completion context #37

obiwan87 opened this issue May 14, 2024 · 0 comments

Comments

@obiwan87
Copy link
Owner

obiwan87 commented May 14, 2024

In the current version, the code completion contributor suggests everything there is in scope. However, this might be too much or lead to nonsensical code in contexts where only types are expected.

TODO:
Filter the suggestion list such that it offers

  • only types where such are expected
  • the elements of an enum where that enum is expected
  • the fields of a struct on the left side of struct initialization statements
  • the variants of a union in a type assert
  • the selectable identifiers in case a type constrained parameter is used with "."
  • ... to be continued
@obiwan87 obiwan87 changed the title Code Completion: Offer only types in contexts where types are expected Code Completion: Respect completion context May 14, 2024
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

No branches or pull requests

1 participant