Language Server and VS Code Extension - #4
Merged
Conversation
…n and syntax definitions Co-authored-by: Copilot <copilot@github.com>
- Introduced a new header file `parser.h` for Tree-sitter parser definitions, including structures and macros for lexer and parser actions. - Created a test script `test-shared-corpus.js` to validate parsing and highlighting of RLS syntax using Tree-sitter. - The test checks for valid and incomplete input parsing, as well as highlights and indentation queries. Co-authored-by: Copilot <copilot@github.com>
…yntax Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…n, and console tests Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…nced semantic analysis Co-authored-by: Copilot <copilot@github.com>
…implement methods for retrieving types and calls at specific positions Co-authored-by: Copilot <copilot@github.com>
…exes, enhance SemanticIndex with diagnostic handling, and update CMake configuration for parser linkage Co-authored-by: Copilot <copilot@github.com>
…acking Co-authored-by: Copilot <copilot@github.com>
- Introduced a new diagnostics header file to encapsulate diagnostic message creation. - Updated validation functions to utilize the new diagnostic functions for better readability and maintainability. - Enhanced the `structureValidationDiagnostics` function to convert declaration-validation diagnostics into structured compiler diagnostics. - Modified the `buildSemanticIndex` function to include validation diagnostics in the semantic index. - Added tests to verify the exposure of structured validation diagnostics and the relation of duplicate region data to its first definition. - Cleaned up diagnostic message creation in `generate_regions.cpp` for consistency. Co-authored-by: Copilot <copilot@github.com>
…mantic analysis Co-authored-by: Copilot <copilot@github.com>
- Added ClientConnection class for managing communication with the LSP server. - Introduced DocumentStore for handling text documents with version control. - Created DocumentUri utility functions for normalizing and generating document URIs. - Developed JsonRpcRouter for routing JSON-RPC requests and notifications. - Implemented MessageFramer for framing messages according to the JSON-RPC protocol. - Established ServerCompositionRoot to manage server lifecycle and document handling. - Added main entry point for the LSP server application. - Implemented unit tests for ClientConnection, DocumentStore, JsonRpcRouter, MessageFramer, and ServerCompositionRoot to ensure functionality and correctness. Co-authored-by: Copilot <copilot@github.com>
- Added DocumentSynchronizationService to handle document open, change, and close operations. - Introduced LifecycleService to manage server lifecycle states and document update acceptance. - Refactored ServerCompositionRoot to utilize new services for route registration. - Created route modules for lifecycle and document synchronization. - Implemented project management logic to associate documents with their respective projects. - Added tests for document synchronization and lifecycle services to ensure correct behavior. - Enhanced URI handling with UTF-8 validation and file path conversion. Co-authored-by: Copilot <copilot@github.com>
… changes Co-authored-by: Copilot <copilot@github.com>
- Added DiagnosticPublisher class to manage and publish diagnostics for documents. - Introduced OutboundMessageQueue for handling outgoing messages in a thread-safe manner. - Updated AnalysisScheduler to accept a handler for accepted snapshots. - Enhanced DocumentSynchronizationService to utilize DiagnosticPublisher for document events. - Implemented new utility functions for converting file paths to URIs and vice versa. - Added tests for DiagnosticPublisher to ensure correct publishing of diagnostics and handling of document states. - Refactored existing code to integrate new diagnostic features and improve overall architecture. Co-authored-by: Copilot <copilot@github.com>
- Added WorkspaceService to manage workspace folders and project refresh logic. - Introduced methods for handling workspace folder changes and watched file notifications. - Updated lifecycle routes to include workspace initialization and notifications. - Refactored analysis scheduling to support project analysis based on workspace changes. - Enhanced ProjectManager to handle multiple project assignments and refresh logic. - Added tests for workspace service functionality, including folder tracking and manifest changes. - Updated diagnostic publisher to clear diagnostics for removed projects. - Implemented project analysis scheduling in response to workspace changes. Co-authored-by: Copilot <copilot@github.com>
- Added document and manifest generation tracking in AnalysisRequest and ProjectState. - Implemented configuration diagnostics publishing in DiagnosticPublisher. - Updated ProjectManager to manage document and manifest generations. - Enhanced analysis scheduling logic to reject requests with stale generations. - Introduced structured configuration diagnostics for manifest errors. - Added tests for analysis scheduler and diagnostic publisher to ensure correct behavior. - Updated workspace service to publish configuration diagnostics on project refresh. Co-authored-by: Copilot <copilot@github.com>
… support Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
- Added language support for Rando Logic Script, including syntax highlighting and live compiler diagnostics. - Introduced a language server with executable discovery and configuration options. - Implemented commands for restarting the language server and handling file changes. - Created tests for verifying live diagnostics and server restart functionality. - Added TypeScript configuration and test fixtures for extension-host testing. - Updated documentation to reflect new integration and features. Co-authored-by: Copilot <copilot@github.com>
…zed the examples and tests. Co-authored-by: Copilot <copilot@github.com>
…ecycle and routing functionalities Co-authored-by: Copilot <copilot@github.com>
…hlights support; update navigation service and routes Co-authored-by: Copilot <copilot@github.com>
…t, update lifecycle service and navigation service. Co-authored-by: Copilot <copilot@github.com>
…te package scripts; include .vsix files in .gitignore
Co-authored-by: Copilot <copilot@github.com>
…ing source identity management Co-authored-by: Copilot <copilot@github.com>
- Added RenameService class to handle renaming of symbols across multiple files. - Implemented prepare and rename methods to provide rename functionality. - Introduced RenameTextEdit and RenameWorkspaceEdit structures for managing edits. - Enhanced semantic indexing to support exit targets and pattern matching for extern enum patterns. - Updated tests to cover various rename scenarios including extern defines, enums, and region exits. - Added error handling for invalid names, collisions, and unsupported client features. - Refactored existing code to accommodate new rename functionality and ensure compatibility with the LSP. Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
- Introduced a GitHub Actions workflow for packaging and releasing the VS Code extension, including smoke tests and validation of VSIX files. - Added a new script to validate the generated VSIX files against expected targets and formats. - Updated package.json to include new dependencies and scripts for validation. - Enhanced the bundling script to support architecture checks for the language server executables. - Created a CHANGELOG.md to document the changes in version 0.1.0. - Added RELEASING.md to outline the release process and marketplace publication steps. Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces major improvements to the build system, project structure, and documentation, with a focus on supporting robust VS Code extension packaging and release workflows, improved editor integration, and enhanced C++ source handling. It also adds comprehensive project manifest support and updates the language documentation accordingly.
Build and Release Automation:
.github/workflows/release.yml) to automate packaging, validating, attesting, and publishing the VS Code extension for all supported platforms. This workflow verifies version tags, builds platform-specific VSIX packages, and publishes them to the Visual Studio Marketplace..github/workflows/ci.yml) to build, test, and package the VS Code extension for Linux, Windows, and macOS, including running grammar and language client tests. Artifacts are now stored for each platform.Editor and Developer Experience:
.vscode/launch.json,.vscode/tasks.json) for running, building, and packaging the RLS language server and extension, streamlining editor-based development. [1] [2]Project Manifest and Documentation:
rls.json) and updated theREADME.mdto document manifest structure, usage, and schema validation. The CLI now supports project-based workflows and validates manifest paths and transpiler configuration. [1] [2] [3]C++ Core Enhancements:
CMakeLists.txt) for better cross-platform builds, including static MSVC runtime linking, Clang-specific options, and new project/lsp subdirectories. [1] [2]ast/include/ast.hwith a newSourceTextclass for robust UTF-8/UTF-16 handling, new data structures for source ranges and positions, and additional fields to support richer editor and language server features. [1] [2] [3] [4] [5] [6]Most Important Changes:
Build and Release Automation
.github/workflows/release.yml)..github/workflows/ci.yml).Editor/Developer Experience
.vscode/launch.json,.vscode/tasks.json). [1] [2]Project Manifest and Documentation
rls.json) support, including schema validation, CLI integration, and detailed usage instructions in theREADME.md. [1] [2] [3]C++ Core/AST Improvements
SourceTextclass and related types inast/include/ast.hfor robust UTF-8/UTF-16 source handling and richer editor integration.ast/include/ast.h). [1] [2] [3] [4]