{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Config",
"description": "Main configuration structure",
"type": "object",
"properties": {
"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",
"default": {
"menus": [
{
"label": "File",
"items": [
{
"label": "New File",
"action": "new",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Open File...",
"action": "open",
"args": {},
"when": null,
"checkbox": null
},
{
"separator": true
},
{
"label": "Save",
"action": "save",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Save As...",
"action": "save_as",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Revert",
"action": "revert",
"args": {},
"when": null,
"checkbox": null
},
{
"separator": true
},
{
"label": "Close Buffer",
"action": "close",
"args": {},
"when": null,
"checkbox": null
},
{
"separator": true
},
{
"label": "Switch Project...",
"action": "switch_project",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Quit",
"action": "quit",
"args": {},
"when": null,
"checkbox": null
}
]
},
{
"label": "Edit",
"items": [
{
"label": "Undo",
"action": "undo",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Redo",
"action": "redo",
"args": {},
"when": null,
"checkbox": null
},
{
"separator": true
},
{
"label": "Cut",
"action": "cut",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Copy",
"action": "copy",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Paste",
"action": "paste",
"args": {},
"when": null,
"checkbox": null
},
{
"separator": true
},
{
"label": "Select All",
"action": "select_all",
"args": {},
"when": null,
"checkbox": null
},
{
"separator": true
},
{
"label": "Find...",
"action": "search",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Find in Selection",
"action": "find_in_selection",
"args": {},
"when": "has_selection",
"checkbox": null
},
{
"label": "Find Next",
"action": "find_next",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Find Previous",
"action": "find_previous",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Replace...",
"action": "query_replace",
"args": {},
"when": null,
"checkbox": null
},
{
"separator": true
},
{
"label": "Delete Line",
"action": "delete_line",
"args": {},
"when": null,
"checkbox": null
}
]
},
{
"label": "View",
"items": [
{
"label": "File Explorer",
"action": "toggle_file_explorer",
"args": {},
"when": null,
"checkbox": "file_explorer"
},
{
"separator": true
},
{
"label": "Line Numbers",
"action": "toggle_line_numbers",
"args": {},
"when": null,
"checkbox": "line_numbers"
},
{
"label": "Line Wrap",
"action": "toggle_line_wrap",
"args": {},
"when": null,
"checkbox": "line_wrap"
},
{
"label": "Mouse Support",
"action": "toggle_mouse_capture",
"args": {},
"when": null,
"checkbox": "mouse_capture"
},
{
"separator": true
},
{
"label": "Set Background...",
"action": "set_background",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Set Background Blend...",
"action": "set_background_blend",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Set Compose Width...",
"action": "set_compose_width",
"args": {},
"when": null,
"checkbox": null
},
{
"separator": true
},
{
"label": "Select Theme...",
"action": "select_theme",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Settings...",
"action": "open_settings",
"args": {},
"when": null,
"checkbox": null
},
{
"separator": true
},
{
"label": "Split Horizontal",
"action": "split_horizontal",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Split Vertical",
"action": "split_vertical",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Close Split",
"action": "close_split",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Focus Next Split",
"action": "next_split",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Focus Previous Split",
"action": "prev_split",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Toggle Maximize Split",
"action": "toggle_maximize_split",
"args": {},
"when": null,
"checkbox": null
},
{
"separator": true
},
{
"label": "Terminal",
"items": [
{
"label": "Open Terminal",
"action": "open_terminal",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Close Terminal",
"action": "close_terminal",
"args": {},
"when": null,
"checkbox": null
},
{
"separator": true
},
{
"label": "Toggle Keyboard Capture",
"action": "toggle_keyboard_capture",
"args": {},
"when": null,
"checkbox": null
}
]
},
{
"separator": true
},
{
"label": "Keybinding Style",
"items": [
{
"label": "Default",
"action": "switch_keybinding_map",
"args": {
"map": "default"
},
"when": null,
"checkbox": null
},
{
"label": "Emacs",
"action": "switch_keybinding_map",
"args": {
"map": "emacs"
},
"when": null,
"checkbox": null
},
{
"label": "VSCode",
"action": "switch_keybinding_map",
"args": {
"map": "vscode"
},
"when": null,
"checkbox": null
}
]
}
]
},
{
"label": "Selection",
"items": [
{
"label": "Select All",
"action": "select_all",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Select Word",
"action": "select_word",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Select Line",
"action": "select_line",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Expand Selection",
"action": "expand_selection",
"args": {},
"when": null,
"checkbox": null
},
{
"separator": true
},
{
"label": "Add Cursor Above",
"action": "add_cursor_above",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Add Cursor Below",
"action": "add_cursor_below",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Add Cursor at Next Match",
"action": "add_cursor_next_match",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Remove Secondary Cursors",
"action": "remove_secondary_cursors",
"args": {},
"when": null,
"checkbox": null
}
]
},
{
"label": "Go",
"items": [
{
"label": "Go to Line...",
"action": "goto_line",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Go to Definition",
"action": "lsp_goto_definition",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Find References",
"action": "lsp_references",
"args": {},
"when": null,
"checkbox": null
},
{
"separator": true
},
{
"label": "Next Buffer",
"action": "next_buffer",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Previous Buffer",
"action": "prev_buffer",
"args": {},
"when": null,
"checkbox": null
},
{
"separator": true
},
{
"label": "Command Palette...",
"action": "command_palette",
"args": {},
"when": null,
"checkbox": null
}
]
},
{
"label": "LSP",
"items": [
{
"label": "Show Hover Info",
"action": "lsp_hover",
"args": {},
"when": "lsp_available",
"checkbox": null
},
{
"label": "Go to Definition",
"action": "lsp_goto_definition",
"args": {},
"when": "lsp_available",
"checkbox": null
},
{
"label": "Find References",
"action": "lsp_references",
"args": {},
"when": "lsp_available",
"checkbox": null
},
{
"label": "Rename Symbol",
"action": "lsp_rename",
"args": {},
"when": "lsp_available",
"checkbox": null
},
{
"separator": true
},
{
"label": "Show Completions",
"action": "lsp_completion",
"args": {},
"when": "lsp_available",
"checkbox": null
},
{
"label": "Show Signature Help",
"action": "lsp_signature_help",
"args": {},
"when": "lsp_available",
"checkbox": null
},
{
"label": "Code Actions",
"action": "lsp_code_actions",
"args": {},
"when": "lsp_available",
"checkbox": null
},
{
"separator": true
},
{
"label": "Toggle Inlay Hints",
"action": "toggle_inlay_hints",
"args": {},
"when": "lsp_available",
"checkbox": null
},
{
"label": "Toggle Mouse Hover",
"action": "toggle_mouse_hover",
"args": {},
"when": null,
"checkbox": "mouse_hover"
},
{
"separator": true
},
{
"label": "Restart Server",
"action": "lsp_restart",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Stop Server",
"action": "lsp_stop",
"args": {},
"when": null,
"checkbox": null
}
]
},
{
"label": "Explorer",
"items": [
{
"label": "New File",
"action": "file_explorer_new_file",
"args": {},
"when": "file_explorer_focused",
"checkbox": null
},
{
"label": "New Folder",
"action": "file_explorer_new_directory",
"args": {},
"when": "file_explorer_focused",
"checkbox": null
},
{
"separator": true
},
{
"label": "Open",
"action": "file_explorer_open",
"args": {},
"when": "file_explorer_focused",
"checkbox": null
},
{
"label": "Rename",
"action": "file_explorer_rename",
"args": {},
"when": "file_explorer_focused",
"checkbox": null
},
{
"label": "Delete",
"action": "file_explorer_delete",
"args": {},
"when": "file_explorer_focused",
"checkbox": null
},
{
"separator": true
},
{
"label": "Refresh",
"action": "file_explorer_refresh",
"args": {},
"when": "file_explorer_focused",
"checkbox": null
},
{
"separator": true
},
{
"label": "Show Hidden Files",
"action": "file_explorer_toggle_hidden",
"args": {},
"when": "file_explorer",
"checkbox": "file_explorer_show_hidden"
},
{
"label": "Show Gitignored Files",
"action": "file_explorer_toggle_gitignored",
"args": {},
"when": "file_explorer",
"checkbox": "file_explorer_show_gitignored"
}
]
},
{
"label": "Help",
"items": [
{
"label": "Show Fresh Manual",
"action": "show_help",
"args": {},
"when": null,
"checkbox": null
},
{
"label": "Keyboard Shortcuts",
"action": "keyboard_shortcuts",
"args": {},
"when": null,
"checkbox": null
}
]
}
]
}
}
},
"$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",
"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",
"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"
]
},
"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": []
}
}
},
"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
}
}
},
"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"
}
]
},
"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"
]
},
"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 disabled info label (no action)",
"type": "object",
"properties": {
"info": {
"type": "string"
}
},
"required": [
"info"
]
}
]
}
}
}