{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Config",
"description": "Main configuration structure",
"type": "object",
"properties": {
"version": {
"description": "Configuration version (for migration support)\nConfigs without this field are treated as version 0",
"type": "integer",
"format": "uint32",
"minimum": 0,
"default": 0
},
"theme": {
"description": "Color theme name",
"$ref": "#/$defs/ThemeOptions",
"default": "high-contrast"
},
"check_for_updates": {
"description": "Check for new versions on quit (default: true)",
"type": "boolean",
"default": true
},
"editor": {
"description": "Editor behavior settings (indentation, line numbers, wrapping, etc.)",
"$ref": "#/$defs/EditorConfig",
"default": {
"tab_size": 4,
"auto_indent": true,
"line_numbers": true,
"relative_line_numbers": false,
"scroll_offset": 3,
"syntax_highlighting": true,
"line_wrap": true,
"highlight_timeout_ms": 5,
"snapshot_interval": 100,
"large_file_threshold_bytes": 1048576,
"estimated_line_length": 80,
"enable_inlay_hints": true,
"recovery_enabled": true,
"auto_save_interval_secs": 2,
"highlight_context_bytes": 10000,
"mouse_hover_enabled": true,
"mouse_hover_delay_ms": 500,
"double_click_time_ms": 500,
"auto_revert_poll_interval_ms": 2000,
"file_tree_poll_interval_ms": 3000
}
},
"file_explorer": {
"description": "File explorer panel settings",
"$ref": "#/$defs/FileExplorerConfig",
"default": {
"respect_gitignore": true,
"show_hidden": false,
"show_gitignored": false,
"custom_ignore_patterns": [],
"width": 0.30000001192092896
}
},
"terminal": {
"description": "Terminal settings",
"$ref": "#/$defs/TerminalConfig",
"default": {
"jump_to_end_on_output": true
}
},
"keybindings": {
"description": "Custom keybindings (overrides for the active map)",
"type": "array",
"items": {
"$ref": "#/$defs/Keybinding"
},
"default": []
},
"keybinding_maps": {
"description": "Named keybinding maps (user can define custom maps here)\nEach map can optionally inherit from another map",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/KeymapConfig"
},
"default": {}
},
"active_keybinding_map": {
"description": "Active keybinding map name",
"$ref": "#/$defs/KeybindingMapOptions",
"default": "default"
},
"languages": {
"description": "Per-language configuration overrides (tab size, formatters, etc.)",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/LanguageConfig"
},
"default": {}
},
"lsp": {
"description": "LSP server configurations by language",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/LspServerConfig"
},
"default": {}
},
"menu": {
"description": "Menu bar configuration",
"$ref": "#/$defs/MenuConfig"
},
"warnings": {
"description": "Warning notification settings",
"$ref": "#/$defs/WarningsConfig",
"default": {
"show_status_indicator": true
}
}
},
"$defs": {
"ThemeOptions": {
"description": "Available color themes",
"type": "string",
"enum": [
"dark",
"light",
"high-contrast",
"nostalgia"
]
},
"EditorConfig": {
"description": "Editor behavior configuration",
"type": "object",
"properties": {
"tab_size": {
"description": "Number of spaces per tab character",
"type": "integer",
"format": "uint",
"minimum": 0,
"default": 4
},
"auto_indent": {
"description": "Automatically indent new lines based on the previous line",
"type": "boolean",
"default": true
},
"line_numbers": {
"description": "Show line numbers in the gutter (default for new buffers)",
"type": "boolean",
"default": true
},
"relative_line_numbers": {
"description": "Show line numbers relative to cursor position",
"type": "boolean",
"default": false
},
"scroll_offset": {
"description": "Minimum lines to keep visible above/below cursor when scrolling",
"type": "integer",
"format": "uint",
"minimum": 0,
"default": 3
},
"syntax_highlighting": {
"description": "Enable syntax highlighting for code files",
"type": "boolean",
"default": true
},
"line_wrap": {
"description": "Wrap long lines to fit the window width (default for new views)",
"type": "boolean",
"default": true
},
"highlight_timeout_ms": {
"description": "Maximum time in milliseconds for syntax highlighting per frame",
"type": "integer",
"format": "uint64",
"minimum": 0,
"default": 5
},
"snapshot_interval": {
"description": "Undo history snapshot interval (number of edits between snapshots)",
"type": "integer",
"format": "uint",
"minimum": 0,
"default": 100
},
"large_file_threshold_bytes": {
"description": "File size threshold in bytes for \"large file\" behavior\nFiles larger than this will:\n- Skip LSP features\n- Use constant-size scrollbar thumb (1 char)\nFiles smaller will count actual lines for accurate scrollbar rendering",
"type": "integer",
"format": "uint64",
"minimum": 0,
"default": 1048576
},
"estimated_line_length": {
"description": "Estimated average line length in bytes (used for large file line estimation)\nThis is used by LineIterator to estimate line positions in large files\nwithout line metadata. Typical values: 80-120 bytes.",
"type": "integer",
"format": "uint",
"minimum": 0,
"default": 80
},
"enable_inlay_hints": {
"description": "Whether to enable LSP inlay hints (type hints, parameter hints, etc.)",
"type": "boolean",
"default": true
},
"recovery_enabled": {
"description": "Whether to enable file recovery (Emacs-style auto-save)\nWhen enabled, buffers are periodically saved to recovery files\nso they can be recovered if the editor crashes.",
"type": "boolean",
"default": true
},
"auto_save_interval_secs": {
"description": "Auto-save interval in seconds for file recovery\nModified buffers are saved to recovery files at this interval.\nDefault: 2 seconds for fast recovery with minimal data loss.\nSet to 0 to disable periodic auto-save (manual recovery only).",
"type": "integer",
"format": "uint32",
"minimum": 0,
"default": 2
},
"highlight_context_bytes": {
"description": "Number of bytes to look back/forward from the viewport for syntax highlighting context.\nLarger values improve accuracy for multi-line constructs (strings, comments, nested blocks)\nbut may slow down highlighting for very large files.\nDefault: 10KB (10000 bytes)",
"type": "integer",
"format": "uint",
"minimum": 0,
"default": 10000
},
"mouse_hover_enabled": {
"description": "Whether mouse hover triggers LSP hover requests.\nWhen enabled, hovering over code with the mouse will show documentation.\nDefault: true",
"type": "boolean",
"default": true
},
"mouse_hover_delay_ms": {
"description": "Delay in milliseconds before a mouse hover triggers an LSP hover request.\nLower values show hover info faster but may cause more LSP server load.\nDefault: 500ms",
"type": "integer",
"format": "uint64",
"minimum": 0,
"default": 500
},
"double_click_time_ms": {
"description": "Time window in milliseconds for detecting double-clicks.\nTwo clicks within this time are treated as a double-click (word selection).\nDefault: 500ms",
"type": "integer",
"format": "uint64",
"minimum": 0,
"default": 500
},
"auto_revert_poll_interval_ms": {
"description": "Poll interval in milliseconds for auto-reverting open buffers.\nWhen auto-revert is enabled, file modification times are checked at this interval.\nLower values detect external changes faster but use more CPU.\nDefault: 2000ms (2 seconds)",
"type": "integer",
"format": "uint64",
"minimum": 0,
"default": 2000
},
"file_tree_poll_interval_ms": {
"description": "Poll interval in milliseconds for refreshing expanded directories in the file explorer.\nDirectory modification times are checked at this interval to detect new/deleted files.\nLower values detect changes faster but use more CPU.\nDefault: 3000ms (3 seconds)",
"type": "integer",
"format": "uint64",
"minimum": 0,
"default": 3000
}
}
},
"FileExplorerConfig": {
"description": "File explorer configuration",
"type": "object",
"properties": {
"respect_gitignore": {
"description": "Whether to respect .gitignore files",
"type": "boolean",
"default": true
},
"show_hidden": {
"description": "Whether to show hidden files (starting with .) by default",
"type": "boolean",
"default": false
},
"show_gitignored": {
"description": "Whether to show gitignored files by default",
"type": "boolean",
"default": false
},
"custom_ignore_patterns": {
"description": "Custom patterns to ignore (in addition to .gitignore)",
"type": "array",
"items": {
"type": "string"
},
"default": []
},
"width": {
"description": "Width of file explorer as percentage (0.0 to 1.0)",
"type": "number",
"format": "float",
"default": 0.30000001192092896
}
}
},
"TerminalConfig": {
"description": "Terminal configuration",
"type": "object",
"properties": {
"jump_to_end_on_output": {
"description": "When viewing terminal scrollback and new output arrives,\nautomatically jump back to terminal mode (default: true)",
"type": "boolean",
"default": true
}
}
},
"Keybinding": {
"description": "Keybinding definition",
"type": "object",
"properties": {
"key": {
"description": "Key name (e.g., \"a\", \"Enter\", \"F1\") - for single-key bindings",
"type": "string"
},
"modifiers": {
"description": "Modifiers (e.g., [\"ctrl\"], [\"ctrl\", \"shift\"]) - for single-key bindings",
"type": "array",
"items": {
"type": "string"
}
},
"keys": {
"description": "Key sequence for chord bindings (e.g., [{\"key\": \"x\", \"modifiers\": [\"ctrl\"]}, {\"key\": \"s\", \"modifiers\": [\"ctrl\"]}])\nIf present, takes precedence over key + modifiers",
"type": "array",
"items": {
"$ref": "#/$defs/KeyPress"
}
},
"action": {
"description": "Action to perform (e.g., \"insert_char\", \"move_left\")",
"type": "string"
},
"args": {
"description": "Optional arguments for the action",
"type": "object",
"additionalProperties": true,
"default": {}
},
"when": {
"description": "Optional condition (e.g., \"mode == insert\")",
"type": [
"string",
"null"
],
"default": null
}
},
"required": [
"action"
],
"x-display-field": "/action"
},
"KeyPress": {
"description": "A single key in a sequence",
"type": "object",
"properties": {
"key": {
"description": "Key name (e.g., \"a\", \"Enter\", \"F1\")",
"type": "string"
},
"modifiers": {
"description": "Modifiers (e.g., [\"ctrl\"], [\"ctrl\", \"shift\"])",
"type": "array",
"items": {
"type": "string"
},
"default": []
}
},
"required": [
"key"
]
},
"KeymapConfig": {
"description": "Keymap configuration (for built-in and user-defined keymaps)",
"type": "object",
"properties": {
"inherits": {
"description": "Optional parent keymap to inherit from",
"type": [
"string",
"null"
]
},
"bindings": {
"description": "Keybindings defined in this keymap",
"type": "array",
"items": {
"$ref": "#/$defs/Keybinding"
},
"default": []
}
},
"x-display-field": "/inherits"
},
"KeybindingMapOptions": {
"description": "Available keybinding maps",
"type": "string",
"enum": [
"default",
"emacs",
"vscode"
]
},
"LanguageConfig": {
"description": "Language-specific configuration",
"type": "object",
"properties": {
"extensions": {
"description": "File extensions for this language (e.g., [\"rs\"] for Rust)",
"type": "array",
"items": {
"type": "string"
},
"default": []
},
"filenames": {
"description": "Exact filenames for this language (e.g., [\"Makefile\", \"GNUmakefile\"])",
"type": "array",
"items": {
"type": "string"
},
"default": []
},
"grammar": {
"description": "Tree-sitter grammar name",
"type": "string",
"default": ""
},
"comment_prefix": {
"description": "Comment prefix",
"type": [
"string",
"null"
],
"default": null
},
"auto_indent": {
"description": "Whether to auto-indent",
"type": "boolean",
"default": true
},
"highlighter": {
"description": "Preferred highlighter backend (auto, tree-sitter, or textmate)",
"$ref": "#/$defs/HighlighterPreference",
"default": "auto"
},
"textmate_grammar": {
"description": "Path to custom TextMate grammar file (optional)\nIf specified, this grammar will be used when highlighter is \"textmate\"",
"type": [
"string",
"null"
],
"default": null
},
"show_whitespace_tabs": {
"description": "Whether to show whitespace tab indicators (→) for this language\nDefaults to true. Set to false for languages like Go that use tabs for indentation.",
"type": "boolean",
"default": true
},
"use_tabs": {
"description": "Whether pressing Tab should insert a tab character instead of spaces.\nDefaults to false (insert spaces based on tab_size).\nSet to true for languages like Go and Makefile that require tabs.",
"type": "boolean",
"default": false
},
"tab_size": {
"description": "Tab size (number of spaces per tab) for this language.\nIf not specified, falls back to the global editor.tab_size setting.",
"type": [
"integer",
"null"
],
"format": "uint",
"minimum": 0,
"default": null
},
"formatter": {
"description": "The formatter for this language (used by format_buffer command)",
"anyOf": [
{
"$ref": "#/$defs/FormatterConfig"
},
{
"type": "null"
}
],
"default": null
},
"format_on_save": {
"description": "Whether to automatically format on save (uses the formatter above)",
"type": "boolean",
"default": false
},
"on_save": {
"description": "Actions to run when a file of this language is saved (linters, etc.)\nActions are run in order; if any fails (non-zero exit), subsequent actions don't run\nNote: Use `formatter` + `format_on_save` for formatting, not on_save",
"type": "array",
"items": {
"$ref": "#/$defs/OnSaveAction"
},
"default": []
}
},
"x-display-field": "/grammar"
},
"HighlighterPreference": {
"description": "Preference for which syntax highlighting backend to use",
"oneOf": [
{
"description": "Use tree-sitter if available, fall back to TextMate",
"type": "string",
"const": "auto"
},
{
"description": "Force tree-sitter only (no highlighting if unavailable)",
"type": "string",
"const": "tree-sitter"
},
{
"description": "Force TextMate grammar (skip tree-sitter even if available)",
"type": "string",
"const": "textmate"
}
]
},
"FormatterConfig": {
"description": "Formatter configuration for a language",
"type": "object",
"properties": {
"command": {
"description": "The formatter command to run (e.g., \"rustfmt\", \"prettier\")",
"type": "string"
},
"args": {
"description": "Arguments to pass to the formatter\nUse \"$FILE\" to include the file path",
"type": "array",
"items": {
"type": "string"
},
"default": []
},
"stdin": {
"description": "Whether to pass buffer content via stdin (default: true)\nMost formatters read from stdin and write to stdout",
"type": "boolean",
"default": true
},
"timeout_ms": {
"description": "Timeout in milliseconds (default: 10000)",
"type": "integer",
"format": "uint64",
"minimum": 0,
"default": 10000
}
},
"required": [
"command"
],
"x-display-field": "/command"
},
"OnSaveAction": {
"description": "Action to run when a file is saved (for linters, etc.)",
"type": "object",
"properties": {
"command": {
"description": "The shell command to run\nThe file path is available as $FILE or as an argument",
"type": "string"
},
"args": {
"description": "Arguments to pass to the command\nUse \"$FILE\" to include the file path",
"type": "array",
"items": {
"type": "string"
},
"default": []
},
"working_dir": {
"description": "Working directory for the command (defaults to project root)",
"type": [
"string",
"null"
],
"default": null
},
"stdin": {
"description": "Whether to use the buffer content as stdin",
"type": "boolean",
"default": false
},
"timeout_ms": {
"description": "Timeout in milliseconds (default: 10000)",
"type": "integer",
"format": "uint64",
"minimum": 0,
"default": 10000
},
"enabled": {
"description": "Whether this action is enabled (default: true)\nSet to false to disable an action without removing it from config",
"type": "boolean",
"default": true
}
},
"required": [
"command"
],
"x-display-field": "/command"
},
"LspServerConfig": {
"description": "LSP server configuration",
"type": "object",
"properties": {
"command": {
"description": "Command to spawn the server",
"type": "string"
},
"args": {
"description": "Arguments to pass to the server",
"type": "array",
"items": {
"type": "string"
},
"default": []
},
"enabled": {
"description": "Whether the server is enabled",
"type": "boolean",
"default": true
},
"auto_start": {
"description": "Whether to auto-start this LSP server when opening matching files\nIf false (default), the server must be started manually via command palette",
"type": "boolean",
"default": false
},
"process_limits": {
"description": "Process resource limits (memory and CPU)",
"$ref": "#/$defs/ProcessLimits",
"default": {
"max_memory_percent": 50,
"max_cpu_percent": 90,
"enabled": true
}
},
"initialization_options": {
"description": "Custom initialization options to send to the server\nThese are passed in the `initializationOptions` field of the LSP Initialize request",
"default": null
}
},
"required": [
"command"
],
"x-display-field": "/command"
},
"ProcessLimits": {
"description": "Configuration for process resource limits",
"type": "object",
"properties": {
"max_memory_percent": {
"description": "Maximum memory usage as percentage of total system memory (None = no limit)\nDefault is 50% of total system memory",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0,
"default": null
},
"max_cpu_percent": {
"description": "Maximum CPU usage as percentage of total CPU (None = no limit)\nFor multi-core systems, 100% = 1 core, 200% = 2 cores, etc.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0,
"default": null
},
"enabled": {
"description": "Enable resource limiting (can be disabled per-platform)",
"type": "boolean",
"default": true
}
}
},
"MenuConfig": {
"description": "Menu bar configuration",
"type": "object",
"properties": {
"menus": {
"description": "List of top-level menus in the menu bar",
"type": "array",
"items": {
"$ref": "#/$defs/Menu"
},
"default": []
}
}
},
"Menu": {
"description": "A top-level menu in the menu bar",
"type": "object",
"properties": {
"label": {
"description": "Display label for the menu (e.g., \"File\", \"Edit\")",
"type": "string"
},
"items": {
"description": "Menu items (actions, separators, or submenus)",
"type": "array",
"items": {
"$ref": "#/$defs/MenuItem"
}
}
},
"required": [
"label",
"items"
]
},
"MenuItem": {
"description": "A menu item (action, separator, or submenu)",
"anyOf": [
{
"description": "A separator line",
"type": "object",
"properties": {
"separator": {
"type": "boolean"
}
},
"required": [
"separator"
]
},
{
"description": "An action item",
"type": "object",
"properties": {
"label": {
"type": "string"
},
"action": {
"type": "string"
},
"args": {
"type": "object",
"additionalProperties": true,
"default": {}
},
"when": {
"type": [
"string",
"null"
],
"default": null
},
"checkbox": {
"description": "Checkbox state condition (e.g., \"line_numbers\", \"line_wrap\")",
"type": [
"string",
"null"
],
"default": null
}
},
"required": [
"label",
"action"
]
},
{
"description": "A submenu (for future extensibility)",
"type": "object",
"properties": {
"label": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"$ref": "#/$defs/MenuItem"
}
}
},
"required": [
"label",
"items"
]
},
{
"description": "A dynamic submenu whose items are generated at runtime\nThe `source` field specifies what to generate (e.g., \"themes\")",
"type": "object",
"properties": {
"label": {
"type": "string"
},
"source": {
"type": "string"
}
},
"required": [
"label",
"source"
]
},
{
"description": "A disabled info label (no action)",
"type": "object",
"properties": {
"info": {
"type": "string"
}
},
"required": [
"info"
]
}
]
},
"WarningsConfig": {
"description": "Warning notification configuration",
"type": "object",
"properties": {
"show_status_indicator": {
"description": "Show warning/error indicators in the status bar (default: true)\nWhen enabled, displays a colored indicator for LSP errors and other warnings",
"type": "boolean",
"default": true
}
}
}
}
}