Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configurable keybindings #23 #36

Merged
merged 18 commits into from
Jun 30, 2024
Merged

configurable keybindings #23 #36

merged 18 commits into from
Jun 30, 2024

Conversation

micielski
Copy link
Contributor

@micielski micielski commented Jun 23, 2024

TODO:

  • Handle default keymap placement (along with errors)
  • SHIFT+D
  • Space in files popup
  • F1 in bottom
  • rename SoftQuit to Close
  • KeyModifiers -> CrosstermKeyModifier
  • Merge 2 match branches somewhere into one
  • Iter

@micielski micielski changed the title start implementing config #23 configurable keybindings #23 Jun 23, 2024
@micielski micielski linked an issue Jun 23, 2024 that may be closed by this pull request
@micielski micielski added this to the 0.4 milestone Jun 27, 2024
@micielski micielski marked this pull request as ready for review June 27, 2024 10:50
@micielski micielski requested a review from aidanaden June 27, 2024 10:51
@micielski
Copy link
Contributor Author

micielski commented Jun 27, 2024

@aidanaden could you test this? pretty please (but don't merge this)

@aidanaden
Copy link
Contributor

@aidanaden could you test this? pretty please (but don't merge this)

what am i supposed to be testing for exactly? if everything works as usual?

@micielski
Copy link
Contributor Author

@aidanaden could you test this? pretty please (but don't merge this)

what am i supposed to be testing for exactly? if everything works as usual?

Yes!

@aidanaden
Copy link
Contributor

Yes!

  1. file selection via space in the files popup doesn't work
  2. delete with files (shift + d) doesn't work

rm-config/src/keymap.rs Outdated Show resolved Hide resolved
rm-config/src/keymap.rs Outdated Show resolved Hide resolved
@aidanaden
Copy link
Contributor

Yes!

  1. file selection via space in the files popup doesn't work
  2. delete with files (shift + d) doesn't work

these still dont work fyi - lmk when fixed n ill test again

@micielski
Copy link
Contributor Author

  1. file selection via space in the files popup doesn't work
  2. delete with files (shift + d) doesn't work

these still dont work fyi - lmk when fixed n ill test again

Remove ~/.config/rustmission/keymap.toml and try again

@aidanaden
Copy link
Contributor

aidanaden commented Jun 29, 2024

Remove ~/.config/rustmission/keymap.toml and try again

okay tested again - it works !

rm-config/src/keymap.rs Outdated Show resolved Hide resolved
Comment on lines 383 to 384
utils::ConfigFetchingError::Toml(_) => anyhow::bail!(e),
_ => anyhow::bail!(e),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the utils::ConfigFetchingError needed? since both are bailed .. unless we plan on handling it differently in the future, if so maybe can add a TODO?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's still io::Error that needs to be checked whether or not it's NotFound (in this case a default config is being placed). But those 2 match branches can be merged into one

rm-config/src/keymap.rs Outdated Show resolved Hide resolved
@micielski
Copy link
Contributor Author

@aidanaden Merge this if everything's okay

@aidanaden aidanaden changed the base branch from main to v0.4 June 30, 2024 14:59
@aidanaden aidanaden merged commit c928d87 into intuis:v0.4 Jun 30, 2024
7 checks passed
micielski added a commit that referenced this pull request Jul 4, 2024
* start implementing config

* impl deserialize for keybinding

* refactor(config): restructure

* fix headers_hide

* use indexmap

* get rid of crate's event

* fix help

* refactor writing to lines in help

* default config

* fix uppercase letters

* fix space

* make help key in the bottom reflect reality

* rename SoftQuit to Close

* rename keymodifiers to crosstermkeymodifiers

* merge 2 match branches

* restructure keymap config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: add custom keybindings in config
2 participants