camspiers / snap

A fast finder system for neovim.
The Unlicense
489 stars 17 forks source link

Option to disable duplicate command warning #64

Closed akinsho closed 3 years ago

akinsho commented 3 years ago

The warning that is printed if a config file is reloaded and commands are re-applied, whilst a big improvement over erroring and not applying the commands is actually incredibly spammy the more commands you have applied, especially if you use something like a BufWritePost autocommand to reload your config. When I'm tweaking things in my dotfiles repo, this goes of every time I save in the plugin file, which I thought I could live with but is actually very distracting.

I took a look at the code, and I am wondering if an option to disable the warning could be added somehow, another potential use case for overriding a command is that in some projects I want commands to work differently e.g. vimgrep in snaps repo to ignore lua files for example so in a local config I'd replace the command since I want to use a command name I remember but for it to behave differently.

Anyway I wasn't sure where and how to feed in a config value and if that'd be an approach you'd want so thought I'd raise this issue instead.

camspiers commented 3 years ago

I think that I should probably just remove it, as maybe it isn't as useful as I first thought given your feedback. I think I should introduce a debug mode in which it will print these messages (and more), but for the moment I will just remove it.

camspiers commented 3 years ago

removed in https://github.com/camspiers/snap/commit/9ae23d6c59b1f3732b4217e984557743a1b8c277