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

Indicator functionality within a Layer, OR cursor functionality within a Mode. #12

Closed
jacksanders-xyz opened this issue Dec 26, 2021 · 2 comments

Comments

@jacksanders-xyz
Copy link

Hello!
Really love the plugin (I can't believe this hasn't blown up... such a good idea)

I wanted to ask a quick question/or maybe suggest a feature: I am currently working on building a plugin that allows the user to write musical notation inside of nvim. One mode (called score mode) will allow the user's curser to draw in musical symbols by performing all of the steps required to insert the specific UTF characters. Thus it needs to be able to move around and retain the cursor functionality.

I realize I could do this with a layer BUT I lose the super cool named indicator... I also want to create several submodes under this so an indicator would allow the user to keep track of where they are.

So I was curious as to HOW the plugin accesses nvim's Indicator (and is able to write --INSERT-- or --MY_MODE--) and is it possible to have a mode that also retains the cursor... OR is it possible to have a layer that allows you the indicator. (either would work).

Thanks!

@Iron-E
Copy link
Owner

Iron-E commented Dec 27, 2021

There are a couple of possibilities here, so you can approach it from different angles.

The first (and what I do) is enable cursorcolumn and cursorline, and pass any unrecognized key command into normal mode so the cursor can be moved. This will show a coordinate for where the cursor is on the screen.

The other option is to use a custom statusbar (e.g. feline; see the README) and show the current layer name that way. This has the drawback of requiring a plugin for the user, but the upside of showing the cursor innately.

@jacksanders-xyz
Copy link
Author

Ahh worked perfectly!
Thanks so much!

@Iron-E Iron-E closed this as completed Jan 2, 2022
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

No branches or pull requests

2 participants