feature: Add the possibility to override grapple vim.cmd.close bindings
- Dominant language
- Lua
- Stars
- 716
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
### Did you check the docs?
- [x] I have read the Grapple docs
### Is your feature request related to a problem? Please describe.
First and foremost, thank you guys for this very useful piece of software, here is my problem
I hit the `` (a.k.a `C-[`) a lot in my workflow, for that reason I unexpectedly close grapple window so many times in a day, so I have decided to see if there is a way to disable this keybindings, but unfortunately I have found nothing that can help, I have tried to hook into `ftplugin/grapple.lua` in order to delete these keybindings, I have also tried to set `keys = {}` inside the settings, but I was unlucky.
So I have decided to check the code and see if it can help, I have noticed that those keybindings are hardcoded in this https://github.com/cbochs/grapple.nvim/blob/b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7/lua/grapple/window.lua#L406 and I don't know how I can override these keybidings without maintaining a fork.
My questions are
1. Is there already a way to delete/override these keybindings ?
2. If no is there a workaround that you guys think I can implement to solve this problem ?
Thanks
### Describe the solution you'd like
I think a long solution is to provide a way to the user to completly remove defaults bindings set by grapple, something like
```lua
{
"default_keybindings": false
}
```
In settings
### Describe alternatives you've considered
I have tried to hook into `ftplugin/grapple.lua` in order to delete these keybindings, I have also tried to set `keys = {}` inside the settings, but I was unlucky.
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the keybindings in lua/grapple/window.lua around the referenced line, then inspect the existing settings and ftplugin/grapple.lua behavior mentioned in the issue. Done means users can override or disable Grapple's default window bindings, including , through a documented configuration option without maintaining a fork.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, neovim
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100