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

feat(menu): allow showing virtual text below entries #92

Merged
merged 3 commits into from
Sep 29, 2023

Conversation

willothy
Copy link
Collaborator

@willothy willothy commented Sep 25, 2023

This PR adds the ability to show virt_text below each menu entry:

2023-09-25.06-10-53.mp4

@willothy willothy force-pushed the feat-menu-virt-text branch 5 times, most recently from 2d5ac8e to be05a7c Compare September 26, 2023 07:06
@Bekaboo
Copy link
Owner

Bekaboo commented Sep 27, 2023

@willothy Thanks but the videos seems to be a demo of overseer.nvim instead of this plugin? Sorry I don't get the point of this PR, could you explain it further?

@willothy
Copy link
Collaborator Author

willothy commented Sep 27, 2023

The demo is of the custom ui.select menu I made based on the dropbar menu. This PR adds the ability for each menu entry to (optionally) display a line of virtual text below it. This can be useful for providing extra info for each entry without extending the lines, and since it's virtual text the cursor will skip over it and still only highlight each entry.

The virtual text in the demo is the explanations of each command - you can see it is highlighted as Comment and is skipped over by the cursor.

By default this PR does nothing to change the winbar or dropdown menus, but it provides the virt text as an extension to the current API so that it can be used when creating other kinds of menus.

@Bekaboo
Copy link
Owner

Bekaboo commented Sep 27, 2023

Could we use Pascal case for the virtualtext namespace?

@willothy
Copy link
Collaborator Author

Updated branch and changed the namespace id :)

@Bekaboo Bekaboo merged commit 3daffc1 into Bekaboo:master Sep 29, 2023
4 checks passed
@willothy
Copy link
Collaborator Author

Awesome! Is the ui-select menu something you'd want to integrate into the plugin, or should I just keep that for my own config?

@Bekaboo
Copy link
Owner

Bekaboo commented Sep 29, 2023

@willothy It would be greate if you can help integrating ui-select into this plugin :D

@willothy
Copy link
Collaborator Author

@willothy It would be greate if you can help integrating ui-select into this plugin :D

Sounds good! My current implementation works but contains a few hacky things for my config, I'll clean it up and open a PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants