Language Server and VS Code Extension - #4
Open
xxAtrain223 wants to merge 87 commits into
Open
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>
…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>
…/RandoLogicScript into developer_experience
…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>
…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>
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 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:
rls.json) with a published JSON schema, enabling project-based workflows and configuration via the new--projectCLI option. The manifest supports sources, exclusions, and transpiler outputs, and the CLI behavior is documented and updated accordingly. [1] [2]Editor and Tooling Integration:
.vscode/launch.jsonand.vscode/tasks.jsonfiles to streamline VS Code extension development, bundling, and debugging for the language server and extension. [1] [2]AST and Language Server Support:
SourceTextclass 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]Project Structure and Build System:
projectandlspto the build system for modularization and future development.Type System and Project Metadata:
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.