How dgdiniz/bass_vscode works
Component Details
Client-side (VSCode Extension):
• Text Editor Interface
• Decoration Manager (from errorDecorations.js and keywordDecorations.js)
• Event Handler System (from eventListeners.js)
• State Management (from state.js)
Server-side:
• Completion Provider (from completion.js)
• Language Server Core (from server.js)
Syntax Definition:
• SNES Grammar
• MegaDrive Grammar
• NES Grammar
Connection and Data Flow
• Grammar files feeding into the syntax highlighting system
• Completion provider feeding suggestions to the editor
• Decoration manager applying styles to the editor
External Integration
• A component for the Bass Assembler (external dependency)
• Connection between Language Server and Bass Assembler
The dependency on the custom Bass assembler version
Key Relationships to Highlight:
• How the client communicates with the language server using the LSP protocol
• How different file extensions trigger different syntax highlighting rules
• How the decoration system integrates with the editor
• How code completion suggestions are generated and delivered
Level of Detail:
• Keep the main components visible at a glance
• Use subcomponents to show implementation details
• Notes about required external dependencies (Bass assembler ≥18.1.2)