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
*duplicateIssue identified as a duplicate of another issue(s)apieditor-apiIssues about the API of vscode in the area of editorsfeature-requestRequest for new features or functionality
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
Reacted by metacurb, Craig Condon, Dominik K., Leo Hanisch, Albert Kaaman, Tom Parsons, Nithin Peter, rmt/src, Jared Neil, Alexander and 190 more
Cross refs;
1.This, Right click in vscode edge, mentioned: "visual studio code - Add right click menu item inside gutter of vscode" - Stack Overflow ; ; https://stackoverflow.com/questions/41821174/add-right-click-menu-item-inside-gutter-of-vscode
2.Right click on file in Opsys ;
Add shortcut for file right click context menu. #15939
3.Right click in editor:
Custom menu entires, context menu entries, and action bar items #3192
3.1.Within the bgse/relative-path-and-line extension , their first request;
Feature Request: add actions to context menu #1
4.Click in Menu Bar of editor; this appears to be the item merged as a result of [3]
menu bar extensions #7704
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.
The origin was here: alefragnani/vscode-bookmarks#24
It is just about the mentioned decorator. It is about a single left-click feature like toggling a breakpoint.
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.
Reacted by mkillianey-stripe, sudhagar10, Abhishek Chakraborty, Fatih Bulut, James Norton, Nicholas Chen and Tjark Smalla
onHover would be useful too. For example in AREPL it would be cool if the user could hover over the error icon in the gutter to see the full exception message.
(commenting on this issue instead of a new one because I'm assuming it would be easy to add a onHover event along with onClick)
This is much easier to understand when you see it:
Dennis Pilarinos (@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.
Alessandro Fragnani (@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.
Reacted by Eric Amodio, Alex Danchenko and Michael Blout
*duplicateIssue identified as a duplicate of another issue(s)apieditor-apiIssues about the API of vscode in the area of editorsfeature-requestRequest for new features or functionality
Activity
AnneTheAgile commentedon Oct 31, 2018
Cross refs;
1.This, Right click in vscode edge, mentioned: "visual studio code - Add right click menu item inside gutter of vscode" - Stack Overflow ; ; https://stackoverflow.com/questions/41821174/add-right-click-menu-item-inside-gutter-of-vscode
2.Right click on file in Opsys ;
Add shortcut for file right click context menu. #15939
3.Right click in editor:
Custom menu entires, context menu entries, and action bar items #3192
3.1.Within the bgse/relative-path-and-line extension , their first request;
Feature Request: add actions to context menu #1
4.Click in Menu Bar of editor; this appears to be the item merged as a result of [3]
menu bar extensions #7704
ThisIsABug commentedon Oct 11, 2019
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.
The origin was here: alefragnani/vscode-bookmarks#24
It is just about the mentioned decorator. It is about a single left-click feature like toggling a breakpoint.
sguillia commentedon Feb 7, 2020
There now is an onclick event on the gutter, when editing
settings.json.It doesn't seem exposed through the API though.
sketchbuch commentedon Mar 20, 2020
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.
sudhagar10 commentedon May 3, 2020
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.
chakraborty-slx commentedon May 4, 2020
sudhagar10 can you check this https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters
sudhagar10 commentedon May 4, 2020
Thanks Abhishek Chakraborty (@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.
Almenon commentedon Jul 4, 2020
onHoverwould be useful too. For example in AREPL it would be cool if the user could hover over the error icon in the gutter to see the full exception message.(commenting on this issue instead of a new one because I'm assuming it would be easy to add a
onHoverevent along with onClick)canadaduane commentedon Oct 15, 2020
Has anyone begun working on this?
14 remaining items
aldanchenko commentedon Jan 4, 2023
Hi all 👋
I'm correctly understood that this function is still not implemented?
alefragnani commentedon Jan 5, 2023
Alex Danchenko (@aldanchenko) , you are right. It isn't available yet...
aldanchenko commentedon Jan 9, 2023
I see. Thanks Alessandro Fragnani (@alefragnani)!
weirane commentedon Mar 2, 2023
Dennis Pilarinos (@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.
joyceerhl commentedon Mar 8, 2023
Alessandro Fragnani (@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.
alefragnani commentedon Mar 9, 2023
Joyce Er (@joyceerhl) thanks for pointing that out! I'll definitely take a look, and let you know how to fit on my scenarios 👍
alefragnani commentedon Nov 2, 2023
Hi Joyce Er (@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!
mcoblenz commentedon Dec 6, 2023
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?
mcoblenz commentedon Dec 6, 2023
(see https://marketplace.visualstudio.com/items?itemName=Kale-Lab.salt for the use case)