simvx.core.config¶
Unified application configuration for SimVX.
Merges editor and IDE settings into a single ~/.config/simvx/config.json
file with general, editor, and ide sections.
Module Contents¶
Classes¶
Settings shared by both editor and IDE. |
|
Editor-specific settings. |
|
IDE-specific settings. |
|
Unified config with sections, persisted in |
Functions¶
Return the |
Data¶
API¶
- simvx.core.config.log¶
‘getLogger(…)’
- simvx.core.config.CONFIG_DIR¶
None
- simvx.core.config.CONFIG_FILE¶
None
- simvx.core.config.PROJECT_CONFIG_DIRNAME¶
‘.simvx’
- simvx.core.config.PROJECT_CONFIG_FILENAME¶
‘config.json’
- simvx.core.config.project_config_path(project_root: pathlib.Path | str) pathlib.Path[source]¶
Return the
.simvx/config.jsonpath for a project root.Always returns a path even if no file exists yet; callers should test
.exists()before reading.
- class simvx.core.config.GeneralConfig[source]¶
Settings shared by both editor and IDE.
- theme_preset: str¶
‘dark’
- font_size: float¶
11.0
- window_width: int¶
1600
- window_height: int¶
900
- recent_files: list[str]¶
‘field(…)’
- recent_folders: list[str]¶
‘field(…)’
- recent_projects: list[dict[str, str]]¶
‘field(…)’
- custom_shortcuts: dict[str, str]¶
‘field(…)’
- class simvx.core.config.EditorSection[source]¶
Editor-specific settings.
- dock_layout: dict[str, Any]¶
‘field(…)’
- show_grid: bool¶
True
- grid_size: float¶
1.0
- grid_subdivisions: int¶
4
- snap_enabled: bool¶
False
- snap_size: float¶
0.5
- auto_save_interval: int¶
300
- hot_reload_enabled: bool¶
True
- class simvx.core.config.IDESection[source]¶
IDE-specific settings.
- tab_size: int¶
4
- insert_spaces: bool¶
True
- show_line_numbers: bool¶
True
- show_minimap: bool¶
True
- show_code_folding: bool¶
True
- show_indent_guides: bool¶
True
- auto_save: bool¶
False
- format_on_save: bool¶
True
- sidebar_width: int¶
250
- bottom_panel_height: int¶
200
- sidebar_visible: bool¶
True
- bottom_panel_visible: bool¶
True
- lsp_enabled: bool¶
True
- lsp_command: str¶
‘pylsp’
- lsp_args: list[str]¶
‘field(…)’
- lint_enabled: bool¶
True
- lint_on_save: bool¶
True
- lint_command: str¶
‘ruff check –output-format=json’
- format_command: str¶
‘ruff format’
- python_path: str = <Multiline-String>¶
- venv_path: str = <Multiline-String>¶
- auto_detect_venv: bool¶
True
- debug_adapter: str¶
‘debugpy’
- keybindings: dict[str, str]¶
‘field(…)’
- class simvx.core.config.AppConfig[source]¶
Unified config with sections, persisted in
~/.config/simvx/config.json.- general: simvx.core.config.GeneralConfig¶
‘field(…)’
- editor: simvx.core.config.EditorSection¶
‘field(…)’
- ide: simvx.core.config.IDESection¶
‘field(…)’
- load_with_project(project_root: pathlib.Path | str | None) None[source]¶
Load user config, then overlay any
.simvx/config.jsonfor the project.Project config is loaded ON TOP of the already-applied user config: every key present in the project file replaces the user-config value for that key. Sections / fields omitted from the project file keep their user-config (or default) value. This mirrors the
.editorconfig/.vscode/settings.jsonprecedent: flat per-key override, no deep dict merging (a projecteditordict replaces the user one wholesale only for the fields it sets, thanks to_update_dataclassskipping absent keys).Passing
Noneis equivalent to calling :meth:load.
- save_project(project_root: pathlib.Path | str, *, sections: list[str] | None = None) None[source]¶
Persist the current config to
<project_root>/.simvx/config.json.When sections is given, only those top-level sections are written (e.g.
["editor"]writes just the editor block): useful for committing project-level overrides without leaking machine-specificgeneralfields likerecent_filesinto the project repo.