Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hover Intellisense #75

Open
karniv00l opened this issue Mar 28, 2025 · 2 comments
Open

Hover Intellisense #75

karniv00l opened this issue Mar 28, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@karniv00l
Copy link

Feature Request: Hover Intellisense for Re-Editor

Description

We're requesting hover intellisense functionality for Re-Editor - the ability to show documentation tooltips when users hover over code identifiers.

Current vs Requested

Currently: Re-Editor supports autocomplete while typing with CodePrompt objects.
Requested: Add ability to show tooltips when hovering over existing code, using the same CodePrompt data.

Implementation Needs

  1. Convert mouse coordinates to text positions
  2. Extract word at position
  3. Display tooltip with relevant documentation

Suggested API

CodeEditor(
  enableHoverIntellisense: true,
  hoverIntellisenseBuilder: (context, word, prompts) => DocumentationTooltip(...),
)

This would greatly improve the UX for users reading and writing code in our editor.

@karniv00l karniv00l added the enhancement New feature or request label Mar 28, 2025
@orestesgaolin
Copy link

I was looking into something similar and tried to use onEnter and onExit of the TextSpan but it seems to be not possible. Seems like onEnter is overridden in re-editor and does not behave the same way as for normal TextSpan

@MegatronKing
Copy link
Member

I was looking into something similar and tried to use onEnter and onExit of the TextSpan but it seems to be not possible. Seems like onEnter is overridden in re-editor and does not behave the same way as for normal TextSpan

Indeed, you must use MouseTrackerAnnotationTextSpan rather than TextSpan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants