$ show AdaCore/ada_language_server
The Ada Language Server (ALS) is a Language Server Protocol implementation providing IDE features for Ada and SPARK programming languages. It consists of a core server written in Ada that handles language intelligence features (completion, diagnostics, refactoring, etc.) and a VS Code extension written in TypeScript that integrates with the editor. The architecture follows a client-server model where the language server communicates with editor clients via JSON-RPC. Key components include the Ada-based LSP server implementing standard LSP capabilities plus Ada-specific extensions, the VS Code extension providing editor integration, and a comprehensive test suite validating LSP compliance. The project shows active maintenance with regular commits, clear build systems, and dependency management through Alire.
The LLM identified 5 files worth highlighting for reuse:
Central handler dispatch mechanism that routes LSP requests to specific Ada-language implementations. Demonstrates clean separation of concerns through modular handler functions for each LSP capability (completion, diagnostics, refactoring, etc.). The pattern allows easy extension for new language features while maintaining a consistent interface to the LSP core.
Code generation system that creates Ada bindings from a JSON metaModel of the LSP specification. Ensures strict adherence to the LSP protocol while reducing manual implementation errors. The generated code includes request/response structures, notification handlers, and serialization logic, forming a reliable foundation for LSP communication.
Main extension entry point managing the lifecycle of the VS Code extension. Implements proper initialization, cleanup, and state management for language client connections to both ALS and GPR language servers. Shows excellent resource disposal patterns and error handling for a complex multi-client extension.
Background job processing system that handles long-running LSP operations without blocking the main server loop. Implements priority-based job scheduling with cancellation support, allowing the server to remain responsive while processing intensive tasks like project loading or large-scale refactoring.
Sophisticated completion engine that provides context-aware suggestions for Ada code. Organized into specialized modules for different completion types (keywords, attributes, pragmas, etc.) with clear separation of concerns. Demonstrates deep language understanding through intelligent filtering and ranking of completion items based on current context.