Hello, I'm new to the codebase and I've been fixing some issues involving completions.
I think the code there may need some refactoring. Currently, the
completions entry point calls a dozen of different completions methods and each of them check if they should apply completions or not.
I thought about removing those code checks from these functions and, instead of always calling all of them, just call the ones which are needed based on the cursor position on the document. Does anyone have suggestions about it? :happy:
there are some things that could be improved there, but it's intentional that each completion knows by itself where it applies
^ I believe its easier to oversee the way it is right now
Though we do want to refactor the
CompletionContext somewhat I believe, it currently has a lot of "random" different fields. Looks a bit unwieldy to me at least and is something I wanted to look into the coming week.