Implementation of the Hover feature#20
Merged
Merged
Conversation
- onHover method recognizes comments above a function and shows the content inside the hover information - output.md file is a reference on how the hover information should look like - step.mo is a test fixture for the hover method
- E2E test for onHover added.
- Output not yet where we want it to be
- Fixing compilation error in declarations.test.ts
- Fixing lint errors
Member
|
The basics are working now. E.g. from the DrumBoilder example I would like to get |
Closed
3 tasks
- Resolve all merge conflicts between the hover feature branch and main - Adapt onHover to use the new ModelicaProject/resolveReference architecture - Refactor extractHoverInformation to accept class_definition nodes directly - Add findHoverInfo to Analyzer using resolveReference with local fallback - Fix standalone library documents not stored in the documents map - Fix standalone library name to use declared class name (not filename) - Add rename() method to ModelicaLibrary Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- extractHoverInformation: null check, inputs section - Analyzer.findHoverInfo: definition site, qualified name reference, within-clause fully qualified name resolution Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Member
Add `version: 'stable'` to runTests() to avoid the inferred-version resolution path (which also fetches insider versions and is more network-dependent). Add actions/cache for .vscode-test so repeated CI runs reuse the downloaded VS Code instead of re-fetching every time. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…raries The client e2e test `onDeclaration()` failed because resolving a local variable returned no location when the workspace contained two libraries with the same name (the standalone MyLibrary.mo and the MyLibrary/ directory package). Two underlying bugs: - analyzer.ts resolved nested workspace entries with `path.resolve(nestedRelative)`, which resolves against the process CWD instead of the workspace directory, so nested library packages were discovered inconsistently. Resolve against `libraryPath` instead. - resolveAbsoluteReference only tried the first library matching a name via `find`, giving up if it didn't contain the symbol. Iterate over all same-named libraries until one resolves the full reference chain. Also make the e2e tests poll the provider until results are available (executeProviderUntilResult) instead of relying on a single fixed sleep(5000), which was racy on CI and always paid the full delay. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.




The Goal
This pull request introduces the hover information functionality of the Language Server Protocol for Modelica. The goal of this feature is to provide users with detailed information about Modelica classes, including descriptions, inputs, outputs, and parameters, directly within the hover pop-up interface.
Implementation Details
What Follows Next