1.9 KiB
1.9 KiB
System Architecture & Patterns
Core Architecture
- Plugin management via lazy.nvim
- LSP-based intellisense and code navigation
- Event-driven configuration loading
- Modular plugin configuration
- Enhanced mode state management system
Key Design Patterns
-
Mode Management
- Advanced state persistence
- Event-driven mode transitions
- Mode-specific context preservation
- Pre/post mode change hooks
- Mode validation system
- Mode-specific settings store
-
Event System
- Hierarchical event handling
- Event queueing mechanism
- Async event processing
- Event prioritization
- Mode-specific event handlers
-
Persistence Layer
- Versioned state storage
- State migration system
- Corruption detection
- Fallback mechanisms
- Incremental state updates
-
Integration Patterns
- Mode-aware plugin system
- LSP integration with mode context
- Buffer grouping by mode
- Window layout persistence
- Mode-specific UI elements
-
Configuration Patterns
- Centralized keybinding management
- Plugin-specific configuration in separate modules
- Default options set through vim.opt
- Autocmd groups for event handling
- Mode-specific settings and behaviors
-
LSP Integration
- Mason for LSP server management
- Uniform LSP configuration across languages
- Shared capabilities for completion
- Mode-specific language server configurations
-
Component Relationships
- Mode Manager ↔ Event System
- Event System ↔ Persistence Layer
- Mode Manager ↔ Status Line
- LSP ↔ Mode Context
- Buffer Groups ↔ Mode State
- Window Layout ↔ Mode State
- Plugins ↔ Mode Context
Implementation Standards
- Lua for all configuration
- Consistent error handling
- Modular plugin organization
- Clear separation of concerns
- Mode-aware functionality
- State validation
- Event-driven architecture
- Robust error recovery
- Configuration versioning
- Context preservation