83 lines
3.5 KiB
Rust
83 lines
3.5 KiB
Rust
use settings::macros::define_settings_group;
|
|
use settings::{RespectUserSyncSetting, Setting, SupportedPlatforms, SyncToCloud};
|
|
|
|
define_settings_group!(CodeSettings, settings: [
|
|
code_as_default_editor: CodeAsDefaultEditor {
|
|
type: bool,
|
|
default: false,
|
|
supported_platforms: SupportedPlatforms::ALL,
|
|
sync_to_cloud: SyncToCloud::Never,
|
|
private: false,
|
|
toml_path: "code.editor.use_warp_as_default_editor",
|
|
description: "Whether Galaxy is used as the default code editor.",
|
|
}
|
|
codebase_context_enabled: CodebaseContextEnabled {
|
|
type: bool,
|
|
default: true,
|
|
supported_platforms: SupportedPlatforms::DESKTOP,
|
|
sync_to_cloud: SyncToCloud::Never,
|
|
private: false,
|
|
storage_key: "AgentModeCodebaseContext",
|
|
toml_path: "code.indexing.agent_mode_codebase_context",
|
|
description: "Whether codebase context is provided to the AI agent.",
|
|
},
|
|
auto_indexing_enabled: AutoIndexingEnabled {
|
|
type: bool,
|
|
default: false,
|
|
supported_platforms: SupportedPlatforms::DESKTOP,
|
|
sync_to_cloud: SyncToCloud::Never,
|
|
private: false,
|
|
storage_key: "AgentModeCodebaseContextAutoIndexing",
|
|
toml_path: "code.indexing.agent_mode_codebase_context_auto_indexing",
|
|
description: "Whether automatic codebase indexing is enabled.",
|
|
},
|
|
// Whether or not the user has manually dismissed the code toolbelt new feature popup.
|
|
dismissed_code_toolbelt_new_feature_popup: DismissedCodeToolbeltNewFeaturePopup {
|
|
type: bool,
|
|
default: false,
|
|
supported_platforms: SupportedPlatforms::ALL,
|
|
sync_to_cloud: SyncToCloud::Never,
|
|
private: true,
|
|
},
|
|
// Controls whether the project explorer / file tree appears in the tools panel.
|
|
show_project_explorer: ShowProjectExplorer {
|
|
type: bool,
|
|
default: true,
|
|
supported_platforms: SupportedPlatforms::ALL,
|
|
sync_to_cloud: SyncToCloud::Never,
|
|
private: false,
|
|
toml_path: "code.editor.show_project_explorer",
|
|
description: "Whether the project explorer is shown in the tools panel.",
|
|
},
|
|
// Controls whether global file search appears in the tools panel.
|
|
show_global_search: ShowGlobalSearch {
|
|
type: bool,
|
|
default: true,
|
|
supported_platforms: SupportedPlatforms::ALL,
|
|
sync_to_cloud: SyncToCloud::Never,
|
|
private: false,
|
|
toml_path: "code.editor.show_global_search",
|
|
description: "Whether global file search is shown in the tools panel.",
|
|
},
|
|
// Controls whether hidden files (dotfiles) are shown in the project explorer.
|
|
show_hidden_files: ShowHiddenFiles {
|
|
type: bool,
|
|
default: true,
|
|
supported_platforms: SupportedPlatforms::ALL,
|
|
sync_to_cloud: SyncToCloud::Globally(RespectUserSyncSetting::Yes),
|
|
private: false,
|
|
toml_path: "code.editor.show_hidden_files",
|
|
description: "Whether hidden files (dotfiles) are shown in the project explorer.",
|
|
},
|
|
// Controls whether the language server reformats the file on save.
|
|
format_on_save: FormatOnSave {
|
|
type: bool,
|
|
default: true,
|
|
supported_platforms: SupportedPlatforms::ALL,
|
|
sync_to_cloud: SyncToCloud::Globally(RespectUserSyncSetting::Yes),
|
|
private: false,
|
|
toml_path: "code.editor.format_on_save",
|
|
description: "Whether the language server automatically formats the file on save. Other LSP features (hover, go-to-definition, references, diagnostics) are unaffected.",
|
|
},
|
|
]);
|