This commit is contained in:
Joseph T. Lyons 2024-01-06 14:41:35 -05:00
parent 3d1f522566
commit cdd5cb16ed
14 changed files with 348 additions and 258 deletions

View file

@ -1,3 +1,5 @@
use std::fmt::{Display, Formatter};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use settings::Settings;
@ -12,6 +14,18 @@ pub enum BaseKeymap {
TextMate,
}
impl Display for BaseKeymap {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {
BaseKeymap::VSCode => write!(f, "VSCode"),
BaseKeymap::JetBrains => write!(f, "JetBrains"),
BaseKeymap::SublimeText => write!(f, "Sublime Text"),
BaseKeymap::Atom => write!(f, "Atom"),
BaseKeymap::TextMate => write!(f, "TextMate"),
}
}
}
impl BaseKeymap {
pub const OPTIONS: [(&'static str, Self); 5] = [
("VSCode (Default)", Self::VSCode),