2022-02-27 21:18:04 +00:00
|
|
|
use gpui::{action, MutableAppContext};
|
2022-01-27 16:39:58 +00:00
|
|
|
|
2022-02-27 15:15:38 +00:00
|
|
|
mod buffer_search;
|
|
|
|
mod project_search;
|
2022-01-28 22:00:00 +00:00
|
|
|
|
2022-02-24 18:07:00 +00:00
|
|
|
pub fn init(cx: &mut MutableAppContext) {
|
2022-02-27 15:15:38 +00:00
|
|
|
buffer_search::init(cx);
|
|
|
|
project_search::init(cx);
|
2022-01-28 22:00:00 +00:00
|
|
|
}
|
2022-01-28 00:16:51 +00:00
|
|
|
|
2022-02-27 21:18:04 +00:00
|
|
|
action!(ToggleSearchOption, SearchOption);
|
|
|
|
action!(SelectMatch, Direction);
|
|
|
|
|
2022-01-28 00:16:51 +00:00
|
|
|
#[derive(Clone, Copy)]
|
2022-02-24 18:07:00 +00:00
|
|
|
pub enum SearchOption {
|
2022-01-28 00:16:51 +00:00
|
|
|
WholeWord,
|
|
|
|
CaseSensitive,
|
|
|
|
Regex,
|
|
|
|
}
|
2022-02-27 21:18:04 +00:00
|
|
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq)]
|
|
|
|
pub enum Direction {
|
|
|
|
Prev,
|
|
|
|
Next,
|
|
|
|
}
|