Open AlisCode opened 3 weeks ago
Yeah that sounds useful, I think the format of the config file could be a sticking point. I'd always edge towards JSON
, for ease of use, even though the format itself always causes me pain, but that gitui documentation is interesting and informative.
First of all: Hi, great work on this tool! I'd like to start using it by integrating it into my neovim config. This is an awesome effort, thanks for the hard work.
Is your feature request related to a problem? Please describe. I'm a bit frustrated by the lack of configuration for keybindings. Namely :
tab
to swap between panels isn't really part of my workflow. I'd prefer vim-style bindings such as using H and L to swap between panels for example.q
to quit the app fits my workflow, but I got frustrated when I saw the help panel and I tried to discard it with q, which .. quit the app. Wish I could change that myself.This is just me though, and I'm sure other people would love to customize the tool how they see fit. A follow-up to this issue is probably the ability to customize the colors of the app (the white text on pink background on the help panel in my terminal is .. very hard to read)
Describe the solution you'd like Ideally the user would be able to have a
keybindings
file stored wherever deemed relevant (e.g.$HOME/.config/oxker/keybindings.ron
).Implementation-wise :
Config
struct, that would contain a fieldkeybindings: KeybindingsConfig
should be constructedInputHandler
Regarding the format of the config file, there's a metric ton of alternatives, including :
I really like
gitui
's documentation and technical choice (RON), but I fully acknowledge that it might not be the most welcoming choice, especially for non-Rust folks. Nothing more frustrating than learning about a new tool and seeing a config file with an extension that you've never seen before.All in all, I think RON or TOML would be great choices. Let me know what you think.
Describe alternatives you've considered I described alternatives for config languages above. For larger customization purposes, programs such as neovim allow the user to customize everything with Lua, but this is because the customization goes waaay beyond the scope of keybindings.
Additional context Looks like
input_handler/mod.rs
contains the list of hardcoded keybindings. Some functions may need to be renamed, e.g.s_key
,enter_key
,tab_key
and the likes.