Verb precedence
In my conf.toml, I have an edit verb defined to open files in Neovim:
[[verbs]]
key = "enter"
invocation = "edit"
shortcut = "e"
apply_to = "file"
external = "nvim {file}"
leave_broot = false
In my broot.nvim plugin, I load up another configuration file as well to override the edit verb to edit the file in the current Neovim session instead:
[[verbs]]
key = "enter"
invocation = "edit"
shortcut = "e"
apply_to = "file"
external = "broot.nvim edit +{line} {file}"
from_shell = true
(Other editor integrations use :print_path instead, but the concept is the same.)
Unfortunately, this doesn't work; the first matching verb is used, so the broot.nvim definition never gets triggered.
I'd really like the last matching verb to be used, or to otherwise have some notion of "more important" and "less important" verbs.
Why not reverse the order, and load the nvim broot config first?
Why not reverse the order, and load the nvim broot config first?
Everything other than verbs have later loaded configs take precedence, so verbs being the other way around is inconsistent. It's also a little confusing in the UI seeing both versions of the verb appear, but only the one loaded first is actually usable. Personally, I'd expect the later-loaded verbs to override the specific fields of the earlier-loaded verbs that were defined in the later config.
I agree the verb precedence is confusing and hard to manage alongside the other settings.
Yes, overriding should be the norm. I'll review that.