Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces groundwork for Lua intellisense support (via Lua language server) and modernizes editor diagnostics/tooltips/rendering to support richer hover/diagnostic UX across scripting editors.
Changes:
- Migrates multiple projects from a local AvalonEdit DLL reference to a NuGet
AvalonEditpackage reference (and addsMdXamlwhere needed). - Replaces legacy line-based error storage with a shared
TextEditorDiagnosticmodel + severity, updates renderers/tooltips to use diagnostics and adds markdown tooltip rendering. - Adds Lua language server integration (completion, hover, signature help, diagnostics, and go-to-definition via F12/CTRL+Click) plus UI command + localization plumbing.
Reviewed changes
Copilot reviewed 49 out of 50 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| TombLib/TombLib.Test/TombLib.Test.csproj | Switches AvalonEdit dependency to NuGet package for test project. |
| TombLib/TombLib.Scripting/Workers/ErrorDetectionWorker.cs | Simplifies worker argument passing and returns typed diagnostics. |
| TombLib/TombLib.Scripting/TombLib.Scripting.csproj | Moves AvalonEdit to NuGet and adds MdXaml dependency. |
| TombLib/TombLib.Scripting/Rendering/TextRendering.cs | Removes legacy bitmap-based zig-zag underline rendering helper. |
| TombLib/TombLib.Scripting/Rendering/MarkdownToolTipRenderer.cs | Adds markdown-to-WPF tooltip rendering with code block handling + highlighting. |
| TombLib/TombLib.Scripting/Rendering/ErrorRenderer.cs | Updates underlining to render by diagnostics severity (wavy for errors, straight for others). |
| TombLib/TombLib.Scripting/Rendering/BookmarkRenderer.cs | Renders bookmark highlights using new bookmark collection logic. |
| TombLib/TombLib.Scripting/Objects/TextEditorDiagnosticSeverity.cs | Introduces diagnostic severity enum + label helper. |
| TombLib/TombLib.Scripting/Objects/TextEditorDiagnostic.cs | Introduces diagnostic model with offsets and range helpers. |
| TombLib/TombLib.Scripting/Interfaces/IErrorDetector.cs | Changes error detector API to return IReadOnlyList<TextEditorDiagnostic>. |
| TombLib/TombLib.Scripting/Bases/TextEditorBase.cs | Adds diagnostic storage/tooltips (incl. markdown), popup-based hover UI, and anchor-based bookmark tracking. |
| TombLib/TombLib.Scripting.Tomb1Main/Utils/ErrorDetector.cs | Ports TR1 error detection to emit TextEditorDiagnostic with offsets. |
| TombLib/TombLib.Scripting.Tomb1Main/TombLib.Scripting.Tomb1Main.csproj | Switches AvalonEdit dependency to NuGet package. |
| TombLib/TombLib.Scripting.Tomb1Main/Tomb1MainEditor.cs | Uses diagnostics + markdown hover tooltips in editor integration. |
| TombLib/TombLib.Scripting.Tomb1Main/Services/Implementations/GameflowHoverService.cs | Formats hover output as markdown inline code for improved tooltip rendering. |
| TombLib/TombLib.Scripting.Lua/TombLib.Scripting.Lua.csproj | Switches AvalonEdit dependency to NuGet package. |
| TombLib/TombLib.Scripting.Lua/Services/ILuaIntellisenseProvider.cs | Adds intellisense provider abstraction for Lua LSP features + diagnostics. |
| TombLib/TombLib.Scripting.Lua/Objects/LuaSignatureInfo.cs | Adds signature help DTOs (signature + parameters). |
| TombLib/TombLib.Scripting.Lua/Objects/LuaHoverInfo.cs | Adds hover DTO with markdown/plaintext flag. |
| TombLib/TombLib.Scripting.Lua/Objects/LuaDefinitionLocation.cs | Adds definition location DTO for navigation. |
| TombLib/TombLib.Scripting.Lua/Objects/LuaCompletionItem.cs | Adds completion item DTO. |
| TombLib/TombLib.Scripting.Lua/Objects/LuaCompletionData.cs | Bridges completion DTOs into AvalonEdit ICompletionData. |
| TombLib/TombLib.Scripting.Lua/LuaEditor.SignatureHelp.cs | Adds signature help popup UI rendering for Lua editor. |
| TombLib/TombLib.Scripting.Lua/LuaEditor.Navigation.cs | Adds go-to-definition via F12 and CTRL+Click navigation request flow. |
| TombLib/TombLib.Scripting.Lua/LuaEditor.Intellisense.cs | Adds completion/hover/signature help plumbing + transient tooltip dismissal logic. |
| TombLib/TombLib.Scripting.Lua/LuaEditor.cs | Makes LuaEditor partial, wires intellisense + enables live diagnostics underlining. |
| TombLib/TombLib.Scripting.GameFlowScript/TombLib.Scripting.GameFlowScript.csproj | Switches AvalonEdit dependency to NuGet package. |
| TombLib/TombLib.Scripting.ClassicScript/Utils/ErrorDetector.cs | Ports classic script error detection to TextEditorDiagnostic with offsets. |
| TombLib/TombLib.Scripting.ClassicScript/TombLib.Scripting.ClassicScript.csproj | Switches AvalonEdit dependency to NuGet package. |
| TombLib/TombLib.Scripting.ClassicScript/ClassicScriptEditor.cs | Updates editor to apply diagnostics and suppress definition hovers when diagnostics present. |
| TombIDE/TombIDE.Shared/Resources/Localization/PL/TombIDE.xml | Adds localized label for “Go to Definition”. |
| TombIDE/TombIDE.Shared/Resources/Localization/EN/TombIDE.xml | Adds localized label for “Go to Definition”. |
| TombIDE/TombIDE.Shared/Resources/Localization/Localization.cs | Adds GoToDefinition localization property. |
| TombIDE/TombIDE.Shared/IDEConfiguration.cs | Adds persisted config value for Lua language server path. |
| TombIDE/TombIDE.ScriptingStudio/UI/UIKeys.cs | Adds F12 shortcut mapping for “Go to Definition”. |
| TombIDE/TombIDE.ScriptingStudio/UI/UICommand.cs | Adds GoToDefinition command enum value. |
| TombIDE/TombIDE.ScriptingStudio/UI/DocumentModePresets/ContextMenus/Lua.xml | Adds context menu item for go-to-definition in Lua editor. |
| TombIDE/TombIDE.ScriptingStudio/TombIDE.ScriptingStudio.csproj | Switches AvalonEdit dependency to NuGet package. |
| TombIDE/TombIDE.ScriptingStudio/Settings/LuaSettingsControl.Designer.cs | Enables and labels autocomplete setting checkbox. |
| TombIDE/TombIDE.ScriptingStudio/Settings/ClassicScriptSettingsControl.cs | Updates settings preview to clear diagnostics instead of legacy errors. |
| TombIDE/TombIDE.ScriptingStudio/Services/LuaIntellisense/LuaLanguageServerSettingsFactory.cs | Creates Lua LS settings payload (runtime/workspace/completion/telemetry). |
| TombIDE/TombIDE.ScriptingStudio/Services/LuaIntellisense/LuaLanguageServerResponseParser.cs | Parses LSP responses for completion/hover/definition/signature help. |
| TombIDE/TombIDE.ScriptingStudio/Services/LuaIntellisense/LuaLanguageServerPathHelper.cs | Normalizes paths and URIs for file-based LSP communication. |
| TombIDE/TombIDE.ScriptingStudio/Services/LuaIntellisense/LuaLanguageServerLocator.cs | Resolves LS executable from config/PATH/VS Code extensions and persists discovered path. |
| TombIDE/TombIDE.ScriptingStudio/Services/LuaIntellisense/LuaLanguageServerIntellisenseProvider.cs | Implements ILuaIntellisenseProvider atop the LSP client with document sync + diagnostics publishing. |
| TombIDE/TombIDE.ScriptingStudio/Services/LuaIntellisense/LuaLanguageServerDiagnosticsParser.cs | Converts published LSP diagnostics into TextEditorDiagnostic offsets/messages. |
| TombIDE/TombIDE.ScriptingStudio/Services/LuaIntellisense/LuaLanguageServerClient.cs | Implements JSON-RPC/LSP process client (start/init, request/notify, read loop, config handling). |
| TombIDE/TombIDE.ScriptingStudio/Services/LuaIntellisense/LuaIntellisenseDocumentManager.cs | Tracks document open/change state and associates diagnostics with versions. |
| TombIDE/TombIDE.ScriptingStudio/LuaStudio.Intellisense.cs | Wires Lua studio tabs to LS provider (sync documents, apply diagnostics, handle definition navigation). |
| TombIDE/TombIDE.ScriptingStudio/LuaStudio.cs | Initializes/disposes Lua intellisense and routes GoToDefinition command to the active Lua editor. |
Files not reviewed (1)
- TombIDE/TombIDE.ScriptingStudio/Settings/LuaSettingsControl.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 65 out of 67 changed files in this pull request and generated 2 comments.
Files not reviewed (2)
- TombIDE/TombIDE.ScriptingStudio/Settings/LuaSettingsControl.Designer.cs: Language not supported
- TombLib/TombLib.Forms/Forms/FormAbout.designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 67 out of 69 changed files in this pull request and generated 3 comments.
Files not reviewed (2)
- TombIDE/TombIDE.ScriptingStudio/Settings/LuaSettingsControl.Designer.cs: Language not supported
- TombLib/TombLib.Forms/Forms/FormAbout.designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 102 out of 105 changed files in this pull request and generated 3 comments.
Files not reviewed (3)
- TombIDE/TombIDE.ScriptingStudio/Settings/LuaSettingsControl.Designer.cs: Language not supported
- TombLib/TombLib.Forms/Forms/FormAbout.designer.cs: Language not supported
- TombLib/TombLib.Scripting.Lua/LuaTextBox.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 104 out of 107 changed files in this pull request and generated 2 comments.
Files not reviewed (3)
- TombIDE/TombIDE.ScriptingStudio/Settings/LuaSettingsControl.Designer.cs: Language not supported
- TombLib/TombLib.Forms/Forms/FormAbout.designer.cs: Language not supported
- TombLib/TombLib.Scripting.Lua/LuaTextBox.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot Could you please review this PR and check for any regressions? Any improvements we could make? Any de-duplications possible? Anything which can be simplified? Is anything overengineered? Please rate the changes and whether any additional work needs to be done. |
…r logging, use named constants Agent-Logs-Url: https://github.com/TombEngine/Tomb-Editor/sessions/9974ccc7-84ce-4ed5-8fb6-8d79a73211aa Co-authored-by: Nickelony <20436882+Nickelony@users.noreply.github.com>
Agent-Logs-Url: https://github.com/TombEngine/Tomb-Editor/sessions/9974ccc7-84ce-4ed5-8fb6-8d79a73211aa Co-authored-by: Nickelony <20436882+Nickelony@users.noreply.github.com>
I've done a thorough review of all 108 changed files (~10K lines added). Here's my assessment: Overall Rating: 8/10 — Well-architected, solid implementationThe feature introduces a proper LSP-based Lua intellisense system with good separation of concerns. The architecture is clean and the code quality is high overall. Fixes Applied (commit
|
This pull request introduces significant improvements to Lua intellisense support, refactors and extends configuration path management, and makes various usability and reliability enhancements throughout the codebase. The most notable changes are the integration of a new Lua intellisense provider, the addition of a document manager for intellisense, updates to configuration directory structure, and improved error handling and user experience in the scripting studio.
Lua Intellisense Integration and Infrastructure:
ILuaIntellisenseProviderintegration in theLuaStudioclass, including event hooks for diagnostics and semantic token updates, and implemented navigation to definitions and live diagnostics in editors. (TombIDE/TombIDE.ScriptingStudio/LuaStudio.Intellisense.cs,TombIDE/TombIDE.ScriptingStudio/LuaStudio.cs) [1] [2] [3] [4] [5] [6]LuaIntellisenseDocumentManagerto manage document states, diagnostics, and semantic tokens for Lua files, supporting synchronization and versioning for language server communication. (TombIDE/TombIDE.ScriptingStudio/Services/LuaIntellisense/LuaIntellisenseDocumentManager.cs)Configuration and Path Management Enhancements:
AppContext.BaseDirectoryif the assembly location is unavailable. (GlobalPaths.cs)TextEditorThemesDirectoryand renamedLuaColorConfigsDirectorytoLuaThemeConfigsDirectoryfor clearer separation of themes and color schemes. (GlobalPaths.cs)Usability and Error Handling Improvements:
TombIDE/TombIDE.ScriptingStudio/LuaStudio.cs)TombIDE/TombIDE.ScriptingStudio/LuaStudio.cs) [1] [2] [3] [4]Documentation Updates:
ExternalResources.mdto acknowledge the use of Codicons icon geometry from the VSCode Codicons project under the MIT license. (ExternalResources.md)