{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Fresh Editor Configuration",
"$ref": "#/$defs/Config",
"$defs": {
"Config": {
"type": "object",
"properties": {
"active_keybinding_map": {
"type": "string",
"description": "Active keybinding map name (e.g., \"default\", \"emacs\", \"vscode\", or a custom name)"
},
"check_for_updates": {
"type": "boolean",
"description": "Check for new versions on quit (default: true)"
},
"editor": {
"$ref": "#/$defs/EditorConfig",
"description": "Editor behavior settings (indentation, line numbers, wrapping, etc.)"
},
"file_explorer": {
"$ref": "#/$defs/FileExplorerConfig",
"description": "File explorer panel settings"
},
"keybinding_maps": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/KeymapConfig"
},
"description": "Named keybinding maps (user can define custom maps here)\nEach map can optionally inherit from another map"
},
"keybindings": {
"type": "array",
"items": {
"$ref": "#/$defs/Keybinding"
},
"description": "Custom keybindings (overrides for the active map)"
},
"languages": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/LanguageConfig"
},
"description": "Per-language configuration overrides (tab size, formatters, etc.)"
},
"lsp": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/LspServerConfig"
},
"description": "LSP server configurations by language"
},
"menu": {
"$ref": "#/$defs/MenuConfig",
"description": "Menu bar configuration"
},
"terminal": {
"$ref": "#/$defs/TerminalConfig",
"description": "Terminal settings"
},
"theme": {
"type": "string",
"description": "Color theme name (e.g., \"high-contrast\", \"monokai\", \"solarized-dark\")"
}
},
"description": "Main configuration structure"
},
"EditorConfig": {
"type": "object",
"properties": {
"auto_indent": {
"type": "boolean",
"description": "Automatically indent new lines based on the previous line"
},
"auto_save_interval_secs": {
"type": "integer",
"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)."
},
"enable_inlay_hints": {
"type": "boolean",
"description": "Whether to enable LSP inlay hints (type hints, parameter hints, etc.)"
},
"estimated_line_length": {
"type": "integer",
"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."
},
"highlight_context_bytes": {
"type": "integer",
"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)"
},
"highlight_timeout_ms": {
"type": "integer",
"description": "Maximum time in milliseconds for syntax highlighting per frame"
},
"large_file_threshold_bytes": {
"type": "integer",
"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"
},
"line_numbers": {
"type": "boolean",
"description": "Show line numbers in the gutter"
},
"line_wrap": {
"type": "boolean",
"description": "Wrap long lines to fit the window width"
},
"mouse_hover_delay_ms": {
"type": "integer",
"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"
},
"mouse_hover_enabled": {
"type": "boolean",
"description": "Whether mouse hover triggers LSP hover requests.\nWhen enabled, hovering over code with the mouse will show documentation.\nDefault: true"
},
"recovery_enabled": {
"type": "boolean",
"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."
},
"relative_line_numbers": {
"type": "boolean",
"description": "Show line numbers relative to cursor position"
},
"scroll_offset": {
"type": "integer",
"description": "Minimum lines to keep visible above/below cursor when scrolling"
},
"snapshot_interval": {
"type": "integer",
"description": "Undo history snapshot interval (number of edits between snapshots)"
},
"syntax_highlighting": {
"type": "boolean",
"description": "Enable syntax highlighting for code files"
},
"tab_size": {
"type": "integer",
"description": "Number of spaces per tab character"
}
},
"description": "Editor behavior configuration"
},
"FileExplorerConfig": {
"type": "object",
"properties": {
"custom_ignore_patterns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Custom patterns to ignore (in addition to .gitignore)"
},
"respect_gitignore": {
"type": "boolean",
"description": "Whether to respect .gitignore files"
},
"show_gitignored": {
"type": "boolean",
"description": "Whether to show gitignored files by default"
},
"show_hidden": {
"type": "boolean",
"description": "Whether to show hidden files (starting with .) by default"
},
"width": {
"type": "number",
"description": "Width of file explorer as percentage (0.0 to 1.0)"
}
},
"description": "File explorer configuration"
},
"HighlighterPreference": {
"type": "string",
"enum": [
"auto",
"tree-sitter",
"textmate"
],
"default": "auto",
"description": "Preference for which syntax highlighting backend to use"
},
"KeyPress": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "Key name (e.g., \"a\", \"Enter\", \"F1\")"
},
"modifiers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Modifiers (e.g., [\"ctrl\"], [\"ctrl\", \"shift\"])"
}
},
"required": [
"key"
],
"description": "A single key in a sequence"
},
"Keybinding": {
"type": "object",
"properties": {
"action": {
"type": "string",
"description": "Action to perform (e.g., \"insert_char\", \"move_left\")"
},
"args": {
"type": "object",
"additionalProperties": {},
"description": "Optional arguments for the action"
},
"key": {
"type": "string",
"description": "Key name (e.g., \"a\", \"Enter\", \"F1\") - for single-key bindings"
},
"keys": {
"type": "array",
"items": {
"$ref": "#/$defs/KeyPress"
},
"description": "Key sequence for chord bindings (e.g., [{\"key\": \"x\", \"modifiers\": [\"ctrl\"]}, {\"key\": \"s\", \"modifiers\": [\"ctrl\"]}])\nIf present, takes precedence over key + modifiers"
},
"modifiers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Modifiers (e.g., [\"ctrl\"], [\"ctrl\", \"shift\"]) - for single-key bindings"
},
"when": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Optional condition (e.g., \"mode == insert\")"
}
},
"required": [
"action"
],
"description": "Keybinding definition"
},
"KeymapConfig": {
"type": "object",
"properties": {
"bindings": {
"type": "array",
"items": {
"$ref": "#/$defs/Keybinding"
},
"description": "Keybindings defined in this keymap"
},
"inherits": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Optional parent keymap to inherit from"
}
},
"description": "Keymap configuration (for built-in and user-defined keymaps)"
},
"LanguageConfig": {
"type": "object",
"properties": {
"auto_indent": {
"type": "boolean",
"description": "Whether to auto-indent"
},
"comment_prefix": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Comment prefix"
},
"extensions": {
"type": "array",
"items": {
"type": "string"
},
"description": "File extensions for this language"
},
"grammar": {
"type": "string",
"description": "Tree-sitter grammar name"
},
"highlighter": {
"$ref": "#/$defs/HighlighterPreference",
"description": "Preferred highlighter backend (auto, tree-sitter, or textmate)"
},
"textmate_grammar": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Path to custom TextMate grammar file (optional)\nIf specified, this grammar will be used when highlighter is \"textmate\""
}
},
"description": "Language-specific configuration"
},
"LspServerConfig": {
"type": "object",
"properties": {
"args": {
"type": "array",
"items": {
"type": "string"
},
"description": "Arguments to pass to the server"
},
"auto_start": {
"type": "boolean",
"description": "Whether to auto-start this LSP server when opening matching files\nIf false (default), the server must be started manually via command palette"
},
"command": {
"type": "string",
"description": "Command to spawn the server"
},
"enabled": {
"type": "boolean",
"description": "Whether the server is enabled"
},
"initialization_options": {
"anyOf": [
{},
{
"type": "null"
}
],
"description": "Initialization options sent during LSP initialize request.\nSome language servers (like Deno) require specific options here.\nFor example, Deno requires `{\"enable\": true}` to enable completions."
},
"process_limits": {
"$ref": "#/$defs/ProcessLimits",
"description": "Process resource limits (memory and CPU)"
}
},
"required": [
"command"
],
"description": "Configuration for a language server"
},
"Menu": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/$defs/MenuItem"
},
"description": "Menu items (actions, separators, or submenus)"
},
"label": {
"type": "string",
"description": "Display label for the menu (e.g., \"File\", \"Edit\")"
}
},
"required": [
"items",
"label"
],
"description": "A top-level menu in the menu bar"
},
"MenuConfig": {
"type": "object",
"properties": {
"menus": {
"type": "array",
"items": {
"$ref": "#/$defs/Menu"
},
"description": "List of top-level menus in the menu bar"
}
},
"description": "Menu bar configuration"
},
"MenuItem": {
"type": "string",
"enum": [
"separator",
"action",
"label: string",
"action: string",
"args: hashmap<string, serde_json::value>",
"when: option<string>",
"checkbox: option<string>"
],
"description": "A menu item (action, separator, or submenu)"
},
"ProcessLimits": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable resource limiting (can be disabled per-platform)"
},
"max_cpu_percent": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"description": "Maximum CPU usage as percentage of total CPU (None = no limit)\nFor multi-core systems, 100% = 1 core, 200% = 2 cores, etc."
},
"max_memory_mb": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"description": "Maximum memory usage in megabytes (None = no limit)"
}
},
"description": "Configuration for process resource limits"
},
"TerminalConfig": {
"type": "object",
"properties": {
"jump_to_end_on_output": {
"type": "boolean",
"description": "When viewing terminal scrollback and new output arrives,\nautomatically jump back to terminal mode (default: true)"
}
},
"description": "Terminal configuration"
}
}
}