Synergy DBL Language Server (Prototype)
A prototype Language Server Protocol (LSP) implementation for Synergy DBL, providing syntax highlighting and limited IntelliSense capabilities.
Current Status: MVP Prototype
This is a prototype implementation that uses regex-based parsing to provide basic language support. It is not a production-ready solution but serves as a proof of concept for Synergy DBL language support in IDEs supporting LSP.
Features
Syntax Highlighting
- Synergy DBL (.dbl) syntax highlighting
- Language configuration including:
- Bracket matching
- Comments
- Indentation rules
XML Support
- .synproj file recognition and syntax highlighting
Experimental LSP IntelliSense
- Hover information for:
- Record fields
- Subroutine parameters
- Labels
- Common DBL keywords
- Basic code completion for:
- Record names
- Field names
- Subroutine names
- Labels
- Keywords
- Simple goto definition support
- Basic reference finding
Limitations
- Uses regex-based parsing which may not catch all edge cases
- Limited semantic understanding of the code
- Basic IntelliSense features only
- May not handle all Synergy DBL language constructs correctly
Future Plans
The project plans to evolve beyond the MVP stage with the following improvements:
- Tree-sitter Integration: Replace regex-based parsing with a proper parser using tree-sitter for more accurate syntax analysis
- Enhanced Semantic Analysis: Better understanding of code structure and relationships
- Improved IntelliSense: More accurate and comprehensive code completion and hover information
- Better Error Detection: More reliable syntax and semantic error checking
- Performance Optimization: Improved parsing and analysis speed
Installation
npm install
npm run compile
Usage
This language server can be used with any LSP-compatible editor. The following file extensions are configured by default:
.dbl
→ Synergy DBL
.synproj
→ XML
To associate additional file extensions with Synergy DBL, add the following to your editor settings:
{
"files.associations": {
"*.myext": "dbl" // Add ".myext" extension to Synergy DBL
}
}
Disclaimer
This is a prototype implementation and should not be used in production environments without thorough testing and validation. The current regex-based parsing may not handle all Synergy DBL language constructs correctly.