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

fix: check if mode-specific configs are enabled before adding sources #1231

Merged
merged 1 commit into from
Feb 15, 2025

Conversation

MariaSolOs
Copy link
Contributor

Fixes #1228

if (mode == 'cmdline' and not config.cmdline.enabled) or (mode == 'term' and not config.term.enabled) then
return {}
end

local enabled_providers = mode == 'cmdline' and config.cmdline.sources
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason why I check if enabled is true here is because enabled_providers would fallback to the not-mode-specific source providers, but this allows enabled = false mean that there are no sources for that mode.

@Saghen Saghen merged commit 19f60a6 into Saghen:main Feb 15, 2025
3 of 4 checks passed
@Saghen
Copy link
Owner

Saghen commented Feb 15, 2025

Thank you!

@MariaSolOs MariaSolOs deleted the check-enabled branch February 15, 2025 22:45
@adrian5
Copy link

adrian5 commented Feb 17, 2025

Assuming this caused #1229

blink.cmp/lua/blink/cmp/config/sources.lua:104: `sources.cmdline` has been replaced with `cmdline.sources

… I think the docs still need updating?

@Saghen
Copy link
Owner

Saghen commented Feb 17, 2025

Updated thanks

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.

Can't disable command line completions
3 participants