A plugin for JetBrains IDE's providing comprehensive language support for MAML (Minimal Abstract Markup Language) files.
- Syntax Highlighting
- Code Formatting
- Code Intelligence with JSON Schema support
- Code Inspections for schema compliance and common issues
- Refactoring support including smart key renaming and string conversions
- Structure View for easy navigation
- Editor enhancements like smart quotes, brace matching, and block commenting
- Customizable settings for folding, inspections, and color schemes
- Full syntax highlighting for MAML syntax
- Smart error recovery to help pipoint syntax mistakes and provide improved error messages
- Configurable code style settings based on IntellIJ's JSON code style settings
- Options for tabs vs spaces, indentation size, spaces around colons and commas
- Wrapping options for arrays and objects
- Preservation of blank lines and trailing commas
- Comment formatting options
- Smart comma removal
- Additional common formatting options
- JSON Schema Support: Automatic schema-based completions and validation
- Documentation: Inline documentation from JSON schemas
- Code Folding: Collapse and expand objects, arrays, multiline strings, and unicode escape sequences
- URL and File Path Recognition: Clickable links for URLs and file paths
- Code Completion: Context-aware suggestions for keys and keyword values (
true,false,null)
- Schema compliance validation
- Duplicate key detection with quick fixes
- Invalid escape sequence detection
- Invalid identifier key validation
- Smart Key Renaming: Rename keys with automatic detection of duplicate key conflicts
- String Conversions: Convert between single-line and multiline strings
- Hierarchical view of MAML document structure
- Visual icons for objects, arrays, and properties
- Quick navigation to elements
- Smart quote handling for strings
- Brace matching and auto-completion
- Block commenting with
# - Reference support for file paths and URLs
- Color picker gutter icon for hex, rgb, and rgba color values
- Code folding preferences
- Toggle inspections on/off
- Customizable color scheme for syntax elements
MAML is a JSON-like configuration format with a cleaner syntax:
{
project: "MAML"
tags: [
"minimal"
"readable"
]
# A simple nested object
spec: {
version: 1
author: "Anton Medvedev"
}
# Array of objects
examples: [
{ name: "JSON", born: 2001 }
{ name: "MAML", born: 2025 }
]
notes: """
This is a multiline strings.
Keeps formatting as-is.
"""
}
- Download the plugin from the JetBrains Marketplace
- Install via: Settings → Plugins → Marketplace → Search for "MAML"
# Build the plugin
./gradlew buildPlugin
# Run the plugin in a sandbox IDE
./gradlew runIde
# Run tests
./gradlew test
# Verify plugin compatibility
./gradlew verifyPluginsrc/main/
├── kotlin/com/davidseptimus/maml/
│ ├── lang/ # Language core (parser, lexer, PSI)
│ ├── highlighting/ # Syntax highlighting
│ ├── editor/ # Editor features (folding, commenting)
│ ├── annotators/ # Error highlighting
│ ├── inspections/ # Code inspections
│ ├── intentions/ # Quick fixes and intentions
│ ├── refactoring/ # Rename and refactoring support
│ ├── structure/ # Structure view
│ ├── json/ # JSON Schema integration
│ └── settings/ # Plugin settings
└── resources/
└── META-INF/plugin.xml
- Parser:
src/main/kotlin/com/davidseptimus/maml/lang/MamlParser.bnf - Lexer:
src/main/kotlin/com/davidseptimus/maml/lang/MamlLexer.flex
After modifying the grammar, regenerate the parser using IntelliJ's Generate Parser Code action.
