You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to blink.cmp.Source, that will allow sources to disable themselves.
I know there is already the function should_show_items on sources, but from what I understand this only hides items after a source generates completions. I also see that there is an enabled field in blink.cmp.SourceProviderConfig, but that seems to be only configurable by the user and not the source itself.
However, there are some completion providers that only make sense on, for instance, a specific file type, so having them run on all file types would be wasteful for performance.
This looks pretty simple to implement - adding the function to the source, then updating sources.get_enabled_providers to check the result of the function. If you'd like, and you agree with the change, then I can quickly submit a PR with the changes.
The text was updated successfully, but these errors were encountered:
I'm proposing to add a function
--- @field enabled fun(self: blink.cmp.Source, context: blink.cmp.SignatureHelpContext): bool
to
blink.cmp.Source
, that will allow sources to disable themselves.I know there is already the function
should_show_items
on sources, but from what I understand this only hides items after a source generates completions. I also see that there is anenabled
field inblink.cmp.SourceProviderConfig
, but that seems to be only configurable by the user and not the source itself.However, there are some completion providers that only make sense on, for instance, a specific file type, so having them run on all file types would be wasteful for performance.
This looks pretty simple to implement - adding the function to the source, then updating
sources.get_enabled_providers
to check the result of the function. If you'd like, and you agree with the change, then I can quickly submit a PR with the changes.The text was updated successfully, but these errors were encountered: