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

Extensions API: enhance DecorationOptions with a custom element #792

Closed
wmaurer opened this issue Nov 29, 2015 · 8 comments
Closed

Extensions API: enhance DecorationOptions with a custom element #792

wmaurer opened this issue Nov 29, 2015 · 8 comments
Labels
api feature-request Request for new features or functionality
Milestone

Comments

@wmaurer
Copy link

wmaurer commented Nov 29, 2015

vscode.DecorationOptions allows for a hoverString, but I would like decorated ranges to display a text popover text that doesn't require hovering.

This would allow me to develop an extensions equivalent to atom's jumpy

@egamma egamma added feature-request Request for new features or functionality api labels Nov 29, 2015
@alexdima alexdima self-assigned this Nov 30, 2015
@wmaurer
Copy link
Author

wmaurer commented Dec 1, 2015

@alexandrudima To further refine what I'd like to be able to do:

  • instead of a hover text, be able to be able to define a html string, e.g. "<div class='jumpy label'>aa</div>"
  • be able to define the jumpy and label CSS classes
  • also allow inline styles on the div element
  • be able to position the div element relative to the decorated range, i.e. horizontal and vertical offset
  • should also work with ranges of zero length, i.e. Range(new Position(0, 3), new Position(0,3)) (this currently works with hoverString)
  • be able to programatically define whether the hover element can be displayed or not (possibly via inline style? or by setting the string property to undefined?)

Any feedback on the likelihood of this being implemented would be appreciated.

@egamma egamma modified the milestone: Backlog Dec 10, 2015
@spywhere
Copy link
Contributor

With this such feature, I could also implement the editor rulers via extension (if the VSC is not going to implement #1673 ) properly.

Instead of this...
screen shot 2559-01-31 at 13 26 49

Could be this...
screen shot 2559-01-31 at 13 27 16

@basarat
Copy link
Contributor

basarat commented Jun 6, 2016

Migrating alm.tools to monaco (:heart:) PR alm-tools/alm#121

I had a working version of jumpy in alm with codemirror

Will try and figure out how to add this to monaco 🌹

@Brakkar
Copy link

Brakkar commented Jun 6, 2016

What an amazing job you are doing, I wasn't aware of the alm suite. Can't wait it to use in on vscode. tks.

@fallenleavesguy
Copy link

I want to write a jumpy too, but don't have any better api to show some label on document text.

@Brakkar
Copy link

Brakkar commented Aug 3, 2016

Please keep us informed here guys, if you manage to get jumpy like into vscode

@alexdima alexdima removed their assignment Aug 30, 2016
@DXist
Copy link

DXist commented Sep 30, 2016

Jumpy allows just to move to the beginning of the word. It's better to support jumps to any symbol. https://github.com/easymotion/vim-easymotion is a good example of such functionality.

@wmaurer
Copy link
Author

wmaurer commented Oct 5, 2016

Ok, so it seems that since I created this issue, the API has improved somewhat, and DecorationOptions supports more configuration, including a contentIconPath.

DecorationOptions could still be improved, but as far as I'm concerned this issue can be closed - I'll consider raising a new issue for further improvements.

BTW, if anyone's interested, I've created a slightly buggy but usable Jumpy extension: https://marketplace.visualstudio.com/items?itemName=wmaurer.vscode-jumpy
I'll continue to work on this extension to make it better.

cc @Brakkar

@wmaurer wmaurer closed this as completed Oct 5, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

8 participants