SmiteshP / nvim-navbuddy

A simple popup display that provides breadcrumbs feature using LSP server
Apache License 2.0
770 stars 30 forks source link

Allow opting out of default mappings #21

Closed sQVe closed 1 year ago

sQVe commented 1 year ago

Hey 👋🏼,

First and foremost, big thank you for putting the time and effort into the awesome plugin.

I'm trying to set up my own mappings to navbuddy, where the main goal is to remove the default binding of f since I want to be able to utilize the features provided by https://github.com/ggandor/flit.nvim.

The mappings is being set by vim.tbl_deep_extend which makes that impossible though, since it will always extend the default mappings.

Would it be possible to change this implementation or add some kind of flag to opt out of the default mappings?

SmiteshP commented 1 year ago

Yep understandable. I made changes to that the table isn't deep extended. It will make it so that if people set custom mappings, they will have to provide all mappings. This might break few people configs, hopefully not too many people are affected. 🤞🏽

LittleTealeaf commented 1 year ago

Could it be set as another option? Such as a "use_default_mappings"?

SmiteshP commented 1 year ago

Could it be set as another option? Such as a "use_default_mappings"?

You can use the default mappings by not passing anything to navbuddy in setup.

LittleTealeaf commented 1 year ago

You can use the default mappings by not passing anything to navbuddy in setup.

I was thinking more of like only wanting to remap a couple keybinds (such as my remap to prevent entering when hitting l). If it's not deep extended, then I would need to re-map every action just to change the functionality of one key-bind. Not a deal-breaker, but I'm wondering if there's a different way to approach this

SmiteshP commented 1 year ago

Hi @LittleTealeaf ! Apologizes for late reply, yep. Added an option in latest commit. @sQVe you might need to set this option to false use_default_mappings = false