Add a way to configure default search options (#17179)
Closes https://github.com/zed-industries/zed/issues/4646 ```json // Search options to enable by default when opening new project and buffer searches. "search": { "whole_word": false, "case_sensitive": false, "include_ignored": false, "regex": false } ``` Release Notes: - Added `search` settings section to configure default options enabled in buffer and project searches ([#4646](https://github.com/zed-industries/zed/issues/4646)) --------- Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
This commit is contained in:
parent
8985fd87c2
commit
65961b80fc
8 changed files with 85 additions and 8 deletions
|
@ -668,7 +668,9 @@ impl ProjectSearchView {
|
|||
let (mut options, filters_enabled) = if let Some(settings) = settings {
|
||||
(settings.search_options, settings.filters_enabled)
|
||||
} else {
|
||||
(SearchOptions::NONE, false)
|
||||
let search_options =
|
||||
SearchOptions::from_settings(&EditorSettings::get_global(cx).search);
|
||||
(search_options, false)
|
||||
};
|
||||
|
||||
{
|
||||
|
@ -3537,7 +3539,7 @@ pub mod tests {
|
|||
editor::init(cx);
|
||||
workspace::init_settings(cx);
|
||||
Project::init_settings(cx);
|
||||
super::init(cx);
|
||||
crate::init(cx);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue