Ghostty Config Syntax (VSCode Extension)
December 19, 2025 ยท View on GitHub
VS Code extension providing syntax highlighting, validation, completions, and hover documentation for Ghostty terminal configuration files.
Features
- Syntax Highlighting: Full TextMate grammar for Ghostty config files
- Validation: Real-time diagnostics for invalid keys, values, and duplicates
- Completions: Intelligent auto-completion for keys and values (Ctrl+Space)
- Hover Documentation: Detailed documentation on hover for all configuration options
- Open Config Command: Quickly open your Ghostty config from the command palette
Installation
Install from the VS Code Marketplace or search for "Ghostty" in the Extensions view.
Usage
The extension automatically activates for:
- Files named
configin Ghostty config directories - Files with
.ghosttyextension
Open Config Command
Use Ctrl+Shift+P (or Cmd+Shift+P on macOS) and search for "Ghostty: Open Config" to quickly open your configuration file.
Supported config locations:
- XDG:
~/.config/ghostty/config - macOS:
~/Library/Application Support/com.mitchellh.ghostty/config
Configuration
| Setting | Default | Description |
|---|---|---|
ghostty-config-syntax.enableDiagnostics | true | Enable real-time validation |
ghostty-config-syntax.diagnosticSeverity | Warning | Severity for unknown key diagnostics |
ghostty-config-syntax.showPlatformHints | true | Show hints for platform-specific keys |
Duplicate Key Handling
Unlike some other config extensions, this extension correctly handles keys that can be specified multiple times. The following keys are repeatable and won't trigger duplicate warnings:
keybind- Multiple keyboard bindingsfont-family,font-family-*- Font fallbacksfont-feature,font-variation*- OpenType featurespalette- Colour palette entriesenv- Environment variablesconfig-file- Include additional config files- And more...
Links
Development
make install # Install dependencies
make build # Compile TypeScript
make test # Run tests
make lint # Lint source code
make package # Build .vsix package
Press F5 in VS Code to launch Extension Development Host.
Licence
MIT - See LICENSE