-
Notifications
You must be signed in to change notification settings - Fork 44
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(foldtext): add option to get virt texts of arbitrary rows #74
feat(foldtext): add option to get virt texts of arbitrary rows #74
Conversation
Not bad, but should pass the metatable into 6th parm for the handler instead of making 1st parm confusing for users. For instance, if 3rd plugin author needs to integrate ufo with his buffer, he will call BTW, I don't know why the name is
Not yet, I don't think it's useful for most users. |
Anyway, you can rename it better. You're the author. |
After considering return a list can't use |
I agree with you. A function is more concise than a list in this case. I'd like to cut off "func" from the function name. It's redundant. Still, it's hard to rename it better.
Provisionally, I rename it What do you think of it? |
Look good, please change |
Sorry for the violation. |
4e659da
to
92a0962
Compare
Force-pushed because the last two commits in doc/example.lua had got conflicted to that of origin/main. Please make sure your last changes are not overwritten there. Well, may I add the screenshot in README.md? |
Don't change the struct of
Sorry, please don't. I want to keep the README.md as clean as possible for users. |
92a0962
to
538db36
Compare
No problem? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So many detail for example
This reverts commit 538db36.
Is that all? |
Thanks a lot, I have squashed and merged it. |
The option converts the first argument of virt text handler into a list of virt texts on Lua metatable.
It's useful when the first lines of folds give little information.
For example, we can see the second lines that show plugin names managed by plugin manager at a glance:
for
for
A sample handler in which folded lines will be concatenated until each
virtText
becomes longer thanminWidth
:In addition, I also suggest such functions to deal with
virtText
s as above be provided for users by, for instance,require('ufo.user-utils')
.