m4xshen / hardtime.nvim

Establish good command workflow and quit bad habit
MIT License
1.38k stars 26 forks source link

`disabled_keys = {}` no longer works as expected #20

Closed svanharmelen closed 1 year ago

svanharmelen commented 1 year ago

I'm using this config, and I just noticed that disabled_keys = {} no longer works as expected. So the key that are disabled by default are still enabled:

image
svanharmelen commented 1 year ago

Same for restricted_keys by the way...

m4xshen commented 1 year ago

I just update the mechanism of config, see explanation. In your case you should change it to:

disabled_keys = {
   ["<UP>"] = {},
   ["<DOWN>"] = {},
   ["<LEFT>"] = {},
   ["<RIGHT>"] = {},
},
svanharmelen commented 1 year ago

The explanation link doesn't seem to work, but I get the picture. Does mean I have to add quite some config now (both in disabled_keys and restricted_keys) just to prevent getting all the defaults... But at least I have a way to fix my issue so thanks for your reaction!

svanharmelen commented 1 year ago

I does work a bit strange/unexpected now through. When I add this (see first screenshot), I still get the other defaults as well. While I get how it works now, this way of configuring the plugin feels a bit weird/unexpected and not inline with how other plugin configs tent to work...

image

So to make things work again I now have to add this config instead:

image
m4xshen commented 1 year ago

Sorry I sent the wrong link, here is the correct one.

The reason why I update the config mechanism is because in the latest update there are a lot of config in hints so if users want to add customize hints, they have to copy all the default hints first and then add a new one, which is inefficient. But with the new mechanism, they can just add a new one in their config and remove some of the hints by setting them to {}. If you have a better approach to solve this problem feel free to tell me!

svanharmelen commented 1 year ago

Thanks for the updated link and I understand that it's a tradeoff (isn't it always 😉). While a little less convenient for me, it's super easy to fix so I'm good.

Thanks for your work on this plugin (it helps me not to cheat 😊 ) and your reactions!