Skip to content

Language Server and VS Code Extension - #4

Open
xxAtrain223 wants to merge 87 commits into
mainfrom
developer_experience
Open

Language Server and VS Code Extension#4
xxAtrain223 wants to merge 87 commits into
mainfrom
developer_experience

Conversation

@xxAtrain223

Copy link
Copy Markdown
Owner

This pull request introduces several significant improvements and new features to the RandoLogicScript project, focusing on project file support, enhanced editor tooling, and expanded AST capabilities. The most important changes are summarized below.

Project and CLI Enhancements:

  • Added support for project manifests (rls.json) with a published JSON schema, enabling project-based workflows and configuration via the new --project CLI option. The manifest supports sources, exclusions, and transpiler outputs, and the CLI behavior is documented and updated accordingly. [1] [2]

Editor and Tooling Integration:

  • Introduced new .vscode/launch.json and .vscode/tasks.json files to streamline VS Code extension development, bundling, and debugging for the language server and extension. [1] [2]
  • Updated CI workflows to install Node and Python, run VS Code client and grammar tests, and add a dedicated grammar test job for TextMate and Tree-sitter grammars. [1] [2]
  • Added a reference to editor configuration documentation in the main README.

AST and Language Server Support:

  • Introduced the SourceText class and related types (SourceRange, Utf16Position) to represent and manipulate immutable, validated UTF-8 source text with precise position mapping and editing capabilities. Comprehensive tests for these features were added. [1] [2]
  • Extended AST node structures to include source spans for operators, parameters, and sections, and updated region and extension declarations for improved editor and analysis support. [1] [2] [3] [4] [5]
  • Expanded diagnostic support with action data, codes, and richer message structures. [1] [2]

Project Structure and Build System:

  • Added new subdirectories for project and lsp to the build system for modularization and future development.

Type System and Project Metadata:

  • Added explicit AST types for region, event, and location values, and extended project metadata to track event and location declarations. [1] [2]

These changes collectively enable project-based workflows, improve editor integration and diagnostics, and lay the groundwork for advanced language tooling.

There are still some improvements to be made to the language server, but it's in a good enough position to merge.

xxAtrain223 and others added 30 commits August 9, 2026 13:36
…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>
…n, and console tests

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>
xxAtrain223 and others added 28 commits August 15, 2026 22:38
…mantic token scopes for functions, parameters, enums, and enum members; update tests and documentation for improved semantic highlighting.

Co-authored-by: Copilot <copilot@github.com>
…update routes and tests for hover feature; enhance documentation and plans for hover integration.

Co-authored-by: Copilot <copilot@github.com>
…ard enum patterns, streamline hover rendering logic, and add tests for navigating wildcard enum values to pattern declarations.
…ard enum patterns, streamline hover rendering logic, and add tests for navigating wildcard enum values to pattern declarations.
…alues in makeToken function and update tests to validate highlighting of resolved unique patterns.
…n extern return types, improve type reference indexing, and update navigation tests for ambiguous names.

Co-authored-by: Copilot <copilot@github.com>
…ations in semantic indexing and improve token highlighting for wildcard values in extern parameter defaults.
…tion scopes to use variable.parameter.rls and adjust token type handling for SectionEntry in semantic token service.

Co-authored-by: Copilot <copilot@github.com>
… semantic indexing, update token types, and improve tests for logical operator emissions.

Co-authored-by: Copilot <copilot@github.com>
… token encoding and update tests for region usage in semantic tokens.

Co-authored-by: Copilot <copilot@github.com>
…te package scripts; include .vsix files in .gitignore
Co-authored-by: Copilot <copilot@github.com>
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>
@xxAtrain223
xxAtrain223 requested a lite review from Copilot August 20, 2026 01:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants