-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
OnClick event on Gutter #5455
Comments
Cross refs; |
@AnneTheAgile just for clarification: the origin of this feature request wasn't the possibility to expose a whole context menu, this is already working some pixels to the right of the gutter. So the user has a very similar possibility already. |
This would be really useful. Any information about if this will happen? I'm making an extension where I want to click on a gutter icon that my extension creates and run a command and/or show a drop down menu. |
I started working on an extension assuming this was already exposed and now I am stuck. I got misled by breakpoint and the edit icon appearing in the gutter of settings page. |
Thanks @chakraborty-slx. Took a look at it. I was able to place icons in gutter. But click event there is not exposed and that is where I am stuck. |
(commenting on this issue instead of a new one because I'm assuming it would be easy to add a |
Has anyone begun working on this? |
It would be a nice feature to have! |
I would love this too! |
FYI, this issue is related to #47559 |
It would be great to have this ability. Bump for this! |
The Java team would also like to see this feature supported, as we are exploring various UX improvement to our Java & Spring extensions. It seems that this is an established UX behavior in Java IDEs and one of the user asks from our survey. If we can support not just click events to the icons next to the line numbers, but also expose some kind of menu (like current testing API), it would be awesome. |
I want to be able to click the line number to make a bookmark — just like I have been able to do in Notepad++ for the past fifteen years. |
Hi all 👋 I'm correctly understood that this function is still not implemented? |
@aldanchenko , you are right. It isn't available yet... |
I see. Thanks @alefragnani! |
@dennispi May I ask what extension is this in the GIF? I'm trying to add hover messages on the gutter decoration but can't figure out how to do it. I think it'll be helpful to see how this extension does it. |
@alefragnani @nickzhums FYI, relatedly there's an API proposal to expose a context menu in the editor gutter #175945 in order to support copying links for a line or range. You can try it out in the latest insiders but it'll only work in development until finalization. Any feedback is appreciated. |
@joyceerhl thanks for pointing that out! I'll definitely take a look, and let you know how to fit on my scenarios 👍 |
Hi @joyceerhl , I would say, at least on my side, that this issue can be closed as completed. 🎉 As I commented on the API Proposal (#175945 (comment)), the API worked perfectly. And I'm already using on my extensions. Thank you! |
I'm not sure that a context menu suffices for our purposes. Can I make it so clicking an icon causes an action? Or must the icon open a context menu? |
(see https://marketplace.visualstudio.com/items?itemName=Kale-Lab.salt for the use case) |
How could I handle
OnClick
events on Gutter, similar to how breakpoints does?The intention was to connect it with a decorator (previously created with
vscode.window.createTextEditorDecorationType
) so the user should Click on the Gutter and create/destroy the decorator assigned to the line where the user clicked.Thanks in advance
The text was updated successfully, but these errors were encountered: