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
As some issues (e.g., #132) or discussions on reddit show, the current way to configure sources appears to be confusing to some users. I think the problem derives from the fact that sources.providers is a list and not a dictionary.
Using lists of non-primitives is somewhat counterintuitive for many people, since the way vim.tbl_deep_extend() works, you need to copypaste the whole list if you want to adjust one property in one of the list elements. This leads to confusions, as can be seen in #132. Using lists of non-primitives is a pretty rare occurrence in nvim plugins to begin with, probably due to this problem.
Other than being less intuitive, the need to specify the full list unnecessarily creates the need to copy a lot of default configs, even if you intend to only change one detail. Furthermore, exposing "blink.cmp.sources.lsp" to the user feels unnecessary to me, just referring to a source via its name "LSP" should be enough?
Suggested change
I suggest using a dict to configure the individual sources, something like this:
Comparison of the current config and the suggested change
If a user just wants to specify the path to their snippet folder, but not change anything else regarding blink.cmp's default config, their config currently will have to look like this:
Yeah, totally agree with you, I've got a few commits locally implemented this. I'm thinking of doing something very similar, although will likely move the options one level up and nest the whole thing in autocomplete to leave room for sources options and eventually cmdline sources. So it would be:
The problem
As some issues (e.g., #132) or discussions on reddit show, the current way to configure sources appears to be confusing to some users. I think the problem derives from the fact that
sources.providers
is a list and not a dictionary.Using lists of non-primitives is somewhat counterintuitive for many people, since the way
vim.tbl_deep_extend()
works, you need to copypaste the whole list if you want to adjust one property in one of the list elements. This leads to confusions, as can be seen in #132. Using lists of non-primitives is a pretty rare occurrence in nvim plugins to begin with, probably due to this problem.Other than being less intuitive, the need to specify the full list unnecessarily creates the need to copy a lot of default configs, even if you intend to only change one detail. Furthermore, exposing
"blink.cmp.sources.lsp"
to the user feels unnecessary to me, just referring to a source via its name"LSP"
should be enough?Suggested change
I suggest using a dict to configure the individual sources, something like this:
Comparison of the current config and the suggested change
If a user just wants to specify the path to their snippet folder, but not change anything else regarding
blink.cmp
's default config, their config currently will have to look like this:With the suggested change, they only need to do this:
The text was updated successfully, but these errors were encountered: