Implement global settings file (#30444)

Adds a `global_settings.json` file which can be set up by enterprises
with automation, enabling setting settings like edit provider by default
without interfering with user's settings files.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
This commit is contained in:
Tristan Hume 2025-05-13 02:29:32 -04:00 committed by GitHub
parent c6e69fae17
commit 90c2d17042
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 210 additions and 40 deletions

View file

@ -294,6 +294,11 @@ fn main() {
fs.clone(),
paths::settings_file().clone(),
);
let global_settings_file_rx = watch_config_file(
&app.background_executor(),
fs.clone(),
paths::global_settings_file().clone(),
);
let user_keymap_file_rx = watch_config_file(
&app.background_executor(),
fs.clone(),
@ -340,7 +345,12 @@ fn main() {
}
settings::init(cx);
zlog_settings::init(cx);
handle_settings_file_changes(user_settings_file_rx, cx, handle_settings_changed);
handle_settings_file_changes(
user_settings_file_rx,
global_settings_file_rx,
cx,
handle_settings_changed,
);
handle_keymap_file_changes(user_keymap_file_rx, cx);
client::init_settings(cx);
let user_agent = format!(