How mickeynp/combobulate works
Main Components and Architecture
a. Core Components:
• Language Support Modules (combobulate-*.el files)
• Navigation Engine (combobulate-navigation.el)
• Manipulation Engine (combobulate-manipulation.el)
• Query System (combobulate-query.el)
• Interface Layer (combobulate-interface.el)
• System (combobulate-display.el)
b. Language-Specific Components:
• Grammar Definitions (build/*.json files)
• Language Modules:
• Python (combobulate-python.el)
• JavaScript/TypeScript (combobulate-js-ts.el)
• HTML (combobulate-html.el)
• CSS (combobulate-css.el)
• And others...
Component Relationships
[Tree-Sitter Core] <---> [Combobulate Core] <---> [Language Modules]
• ^
• [User Interface]
• ^
• [Emacs Editor Integration]
Data Flow
[Source Code] -> [Tree-Sitter Parser] -> [Syntax Tree] -> [Combobulate Navigation/Editing] -> [Buffer Modifications]
Key Design Elements
Important architectural patterns:
a. Extension System:
• How language modules plug into the core system
• Demonstrate grammar definition integration
• Query system interaction
b. Command System:
• Navigation commands
• Editing commands
• Envelope (templating) system
• Multiple cursor support
Component Details
• Name
• Primary responsibility
• Key interfaces
• Dependencies
Integration Points
Integration with:
• Emacs editor
• Tree-sitter library
• Major modes
• Minor mode system
The user interface components
Use a hierarchical layout with:
• Core components at the center
• Language modules arranged around the core
• External dependencies at the edges
• Clear separation of concerns between layers
This architecture emphasizes Combobulate's design philosophy of extensibility, language independence, and integration with existing Emacs features while maintaining a shallow learning curve for users.