Add TextMate keymap

This commit is contained in:
Joseph Lyons 2023-03-13 08:27:04 -04:00
parent d2411a6c86
commit c8696149b8
5 changed files with 100 additions and 7 deletions

View file

@ -63,23 +63,26 @@ pub enum BaseKeymap {
#[default]
VSCode,
JetBrains,
Sublime,
SublimeText,
Atom,
TextMate,
}
impl BaseKeymap {
pub const OPTIONS: [(&'static str, Self); 4] = [
pub const OPTIONS: [(&'static str, Self); 5] = [
("VSCode (Default)", Self::VSCode),
("Atom", Self::Atom),
("JetBrains", Self::JetBrains),
("Sublime", Self::Sublime),
("Sublime Text", Self::SublimeText),
("TextMate", Self::TextMate),
];
pub fn asset_path(&self) -> Option<&'static str> {
match self {
BaseKeymap::JetBrains => Some("keymaps/jetbrains.json"),
BaseKeymap::Sublime => Some("keymaps/sublime_text.json"),
BaseKeymap::SublimeText => Some("keymaps/sublime_text.json"),
BaseKeymap::Atom => Some("keymaps/atom.json"),
BaseKeymap::TextMate => Some("keymaps/textmate.json"),
BaseKeymap::VSCode => None,
}
}