nvimtools / hydra.nvim

Create custom submodes and menus
MIT License
145 stars 8 forks source link

vim-options could probably use an overhaul #16

Closed miversen33 closed 10 months ago

miversen33 commented 10 months ago

Looking the vim-options file, it only allows for hard coded options and that seems like a poor decision. If we opened it up a bit, we could in theory allow for any options to be displayed here instead of hard coded options only.

This would almost certainly require a setup function, which we have slightly discussed before.

Thought?

In my head, we could provide a way via initial configuration, to allow a user to specify a function to call and a shorthand to use in a string, and we could interpolate that just like is being done currently with vim-options.

Breaking this open would allow for more control to be given to end users, and more customization options as well.

benlubas commented 10 months ago

https://github.com/nvimtools/hydra.nvim#hint

funcs key lets you pass any function for any option.

Are you talking about auto generating these functions for different options?

miversen33 commented 10 months ago

I'll have to tinker, func seems to do what I was thinking :) IIRC you went down this "rabbit hole" a bit ago so I assume you know the right way of doing this.

Basically I wanted to be able to do arbitrary %{} variables in my hints and ended up digging through vim-options lol

benlubas commented 10 months ago

Yup, funcs allows you to do that

miversen33 commented 10 months ago

Closing this out then :)