Watch ~/.zed/bindings.json file for custom key bindings
Co-authored-by: Keith Simmons <keith@zed.dev>
This commit is contained in:
parent
92a5c30389
commit
be11f63f1e
8 changed files with 110 additions and 60 deletions
|
@ -106,6 +106,11 @@ impl Matcher {
|
|||
self.keymap.add_bindings(bindings);
|
||||
}
|
||||
|
||||
pub fn clear_bindings(&mut self) {
|
||||
self.pending.clear();
|
||||
self.keymap.clear();
|
||||
}
|
||||
|
||||
pub fn clear_pending(&mut self) {
|
||||
self.pending.clear();
|
||||
}
|
||||
|
@ -164,6 +169,10 @@ impl Keymap {
|
|||
fn add_bindings<T: IntoIterator<Item = Binding>>(&mut self, bindings: T) {
|
||||
self.0.extend(bindings.into_iter());
|
||||
}
|
||||
|
||||
fn clear(&mut self) {
|
||||
self.0.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl Binding {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue