emacs-sideline / sideline

Show information on the side
GNU General Public License v3.0
117 stars 14 forks source link

Can I add sidelines at or near particular lines in my file? #12

Closed CarlQLange closed 1 year ago

CarlQLange commented 1 year ago

I would like to constantly display my sidelines on several lines in my buffer, not just on the current cursor location. Is there a way to do this?

In any case, thanks a lot for this package, really helpful!

jcs090218 commented 1 year ago

Unfortunately, there is no way to do this. What is your use case? sideline is designed to display information based on your cursor position. Like company-mode is based on what you have typed.

Thank you for using this package! 😊 I hope the above information makes sense to you!

CarlQLange commented 1 year ago

Yes, I guess I am looking for sidelines to be always visible in the whole buffer regardless of cursor position.

You can see an example of what I'm thinking of in this screenshot from VSCode:

image

The "You, 2 months ago" sections are visible even though my cursor is on line 16.

I think this could be accomplished by modifying sideline--find-line to take an optional line-number argument, and extending it to find a space near that line-number if it's given. What do you think?

jcs090218 commented 1 year ago

This looks like it has to be made with other plugin, like https://github.com/jcs-elpa/codemetrics. Here is another example, see https://github.com/jcs-elpa/codemetrics/issues/1#issuecomment-1496943831. I don't think using the sideline is a good idea since the feel and look will be different. 🤔

CarlQLange commented 1 year ago

Ah, thanks so much for the pointer to that library, that's exactly the UX I was looking for! Appreciate it, and nice job on Two great packages!