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

Show more lines (context) as tooltips shown in the Side Bar #311

Open
ashahabov opened this issue Jun 18, 2020 · 8 comments
Open

Show more lines (context) as tooltips shown in the Side Bar #311

ashahabov opened this issue Jun 18, 2020 · 8 comments

Comments

@ashahabov
Copy link

I have not much experience using this extension and maybe it already exists. If not, then what about:

Add the opportunity to catch more context for a bookmark. For example, as a developer, I

  1. select function;
  2. make a bookmark;
  3. as today, function name will be bookmark's subject;
  4. function body (with some limit) will be displayed when hovering a cursor over the link bookmark.
@ashahabov
Copy link
Author

@alefragnani, I could not clone vscode-bookmarks-core submodule. Is it possible to contribute this project?

@alefragnani
Copy link
Owner

Hi @adamshakhabov ,

when hovering a cursor over the link bookmark

What do you mean about that? Are you talking about the Tooltip displayed in the Side Bar?

If that’t the case, I think is doable to create a context config which you decide the number of lines (up / down) to be displayed in the Tooltip.

On the other hand, using function bodies or anything like that wouldn’t be available, basically because it would be tied to languages (to correctly recognize language-related structures).

Hope this helps

@alefragnani
Copy link
Owner

About cloning/contributions to the repo, thank you for your interest, but it’s not possible right now.

I’m refactoring a few pieces of the extension and until this work is done, it will be closed.

Thank you

@ashahabov
Copy link
Author

Are you talking about the Tooltip displayed in the Side Bar?

Yes, I mean Tooltip which can be configured as you suggested above by some new context variable.

@alefragnani alefragnani changed the title Add more context Show more lines (context) as tooltips shown in the Side Bar Jun 29, 2020
@dseynhae
Copy link

dseynhae commented Feb 17, 2022

I'm not sure what the original intention for this issue was, but I was about to request this feature:

When hovering over a bookmark in the code margin, the label content should appear (like a tooltip). If no label was used, then simply display Bookmark.

This is very similar to breakpoints (which are in the same margin): if you hover over those, you will see the expression, or Breakpoint/Disabled Breakpoint.

Since this is probably what this issue is about, I just wanted to be a bit more explicit about the request.

Note: there currently is a "tooltip" in the Bookmark's Side Bar. That doesn't seem to make much sense to me, as it just discloses the label that is already displayed? There is a different request to extend bookmarks into sticky notes... It would make a lot more sense if the tooltips in the Side Bar would display the content of the sticky notes...

@alefragnani
Copy link
Owner

Hi @dseynhae ,

The idea is to provide more than the current line as tooltip on each bookmark, displaying about 3 lines above and 3 below. Doing so, the user has an idea of a preview/magnifying glass.

Your request, on the other hand, unfortunately is not possible yet, because VS Code does not provide an API for extensions to display anything related to its icon added to the gutter. There is already an open issue on their repo, almost 5 years old (microsoft/vscode#28080), and not ETA.

Hope this helps

@dseynhae
Copy link

That's really a pity (no API to get information from objects in the gutter).

Since breakpoints already do this, it must be easy for Microsoft to create an API for it... but then, if it really was easy, we probably would already have it.

@alefragnani
Copy link
Owner

I'm pretty sure it is doable, because the feature already exists (as you said, breakpoint has). It is just a matter of exposing an API. To sum up, they recently added Context Menu and drag & drop support on gutter, but only for their own features. New APIs on the same location/component.

BTW, that issue has only 14 upvotes, which means that not so many extension developers needs that, unfortunately. VS Code issue tracker today closes issues with less than 20 upvotes after 60 days, if I remember correctly. So, it's a matter of time (or their anual clean up milestone) to that issue to be closed.

I think it is just a matter of priority, and just 14 upvotes means a lot in this case. And even if such process blocks me from adding features to my extensions, I totally understand them. I do the same for my extensions.

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

3 participants