Closed yushiyangk closed 1 year ago
@yushiyangk thanks for the issue! It shouldn't be too tough to add a new keybinding and command that just works the display / remove logic in a toggle kinda way. One hurdle might be that we don't have a great way to know the "state" of the extension (other then the status toggler heh).
/**
* update
* @description Updates the text and tooltip displayed by the StatusBarToggler
*/
private update() {
this.statusBarItem.text = this.getStatusBarText();
if (this.isActive) {
this.statusBarItem.command = StatusBarToggler.removeCommand;
this.statusBarItem.tooltip = StatusBarToggler.removeWatchToolTip;
} else {
this.statusBarItem.command = StatusBarToggler.watchCommand;
this.statusBarItem.tooltip = StatusBarToggler.watchToolTip;
}
}
Taking a stab at this in #385 (just copy-pasting my way to success lol) - please feel free to suggest changes.
Kudos on developing and maintaining an excellent and useful extension by the way! 🎉🎉🎉
Instead of having two separate keybindings for displaying and removing coverage gutters, it would be great if I could bind a single shortcut to toggle it on or off.
This would be similar to e.g. how GitLens controls blame annotations.