You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A common use of text decorations is to render information per line of code. I am working on an extension that does this (using the before decoration). One issue with the current editor behavior is that the rulers remain at their set columns despite the text decorations, which no longer makes sense for the user, since the decoration has displaced the text to the right.
Although text decorations are per line, it makes sense to displace the rulers when all lines are decorated.
The extension may not have the chance to remove the persistent modification if the app is closed.
The extension needs to wait for the thenable returned by update before requesting the new value, which makes multiple extensions modifying this configuration potentially not compatible with each other, since they may try to set the values at the same time.
The user or other extension may modify a different scope than what one extension is modifying, with varying consequences.
Ideally the extensions should be able to either:
a. request an specific offset setRulerExtensionOffset('extension_name', offset) // offset=0 to remove
or
b. request that the ruler takes the before and/or after text decorations into account for where to render the ruler
There is a related issue #111251 with a pending PR, but it seems to be aimed at adding rulers, not at modifying existing rulers due to text decorations.
Please, let me know if there is a better approach.
Thanks!
The text was updated successfully, but these errors were encountered:
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.
🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.
Hi,
A common use of text decorations is to render information per line of code. I am working on an extension that does this (using the
before
decoration). One issue with the current editor behavior is that the rulers remain at their set columns despite the text decorations, which no longer makes sense for the user, since the decoration has displaced the text to the right.Although text decorations are per line, it makes sense to displace the rulers when all lines are decorated.
I am able to change the rulers with:
However, this seems rather brittle:
thenable
returned by update before requesting the new value, which makes multiple extensions modifying this configuration potentially not compatible with each other, since they may try to set the values at the same time.Ideally the extensions should be able to either:
a. request an specific offset
setRulerExtensionOffset('extension_name', offset) // offset=0 to remove
or
b. request that the ruler takes the
before
and/orafter
text decorations into account for where to render the rulerThere is a related issue #111251 with a pending PR, but it seems to be aimed at adding rulers, not at modifying existing rulers due to text decorations.
Please, let me know if there is a better approach.
Thanks!
The text was updated successfully, but these errors were encountered: