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

Support Line decoration editor offset retrieval #237095

Open
marrej opened this issue Dec 30, 2024 · 0 comments
Open

Support Line decoration editor offset retrieval #237095

marrej opened this issue Dec 30, 2024 · 0 comments
Assignees

Comments

@marrej
Copy link
Contributor

marrej commented Dec 30, 2024

Problem statement

Core contributions which are trying to render overlay widgets properly can currently rely only the line offsets, but those disregard decoration offsets.

Meaning that when decorations which contain text are rendered after the current content (e.g. via the inlineSuggest, but also other AI contributions), overlay widgets struggle to correctly render without overlaying the decoration (which might contain text that the user wants to read).

Value statement

Allowing to get the decoration offset, allows to easily render any new overlay/absolutely positioned widgets, without hiding any interesting suggestions/decorations. This would allow for more flexibility with novel UX/UI interactions.

Proposal

In the same way as the editor currently allows to retrieve an offset for a specific column, allow to get an offset for a decoration.

The decorations can be accessed in the visible line and can provide positional information, which can then be used to correctly calculate the horizontal position in the editor.

The returned value would be left: number for the right most (last) decoration, starting at the provided column and containing expected className.

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

No branches or pull requests

2 participants