Only return static suggestions when the token matches a known filter
Created by: lguychard
Suggestions are slow to display when dynamic suggestions are slow to fetch because:
- Monaco
CompletionItemProvider
does not support observables, so it's impossible to return a stream of suggestions that gets displayed incrementally. - Even if we register several completion item providers, for instance one for static suggestions and one for dynamic suggestions, Monaco will block on the slowest provider to display the suggestions widget.
There would be some hacky ways to solve this (eg. force a refresh of suggestions when dynamic suggestions have been fetched), but a straightforward solution that makes suggestions as reactive as possible is to only display static filter type suggestions if the token being typed matches a known filter.