zed/crates/search/src/search.rs

26 lines
437 B
Rust
Raw Normal View History

use gpui::{action, MutableAppContext};
mod buffer_search;
mod project_search;
pub fn init(cx: &mut MutableAppContext) {
buffer_search::init(cx);
project_search::init(cx);
}
2022-01-28 00:16:51 +00:00
action!(ToggleSearchOption, SearchOption);
action!(SelectMatch, Direction);
2022-01-28 00:16:51 +00:00
#[derive(Clone, Copy)]
pub enum SearchOption {
2022-01-28 00:16:51 +00:00
WholeWord,
CaseSensitive,
Regex,
}
#[derive(Clone, Copy, PartialEq, Eq)]
pub enum Direction {
Prev,
Next,
}