Artawower / blamer.el

A git blame plugin for emacs inspired by VS Code's GitLens plugin
GNU General Public License v3.0
431 stars 15 forks source link

The font size of annotations does not adjust #15

Closed stefanq closed 9 months ago

stefanq commented 3 years ago

I code C++ with emacs and use non-standard font sizes. Also, I frequently use to adjust the font size with (Ctrl-x + +). It seems, that this does not affect the font size of the dynamic blame annotations at all. I.e. these are always bigger than my coding font. This means, whenever I move the text cursor, the line height will automatically adjust as the annotations appear (or disappear).

Artawower commented 3 years ago

Perhaps you are looking for a :height property?

Try to eval (or add to config) (set-face-attribute 'blamer-face nil :height 1.0)

stefanq commented 3 years ago

Thank you, that works well! It even inspired me to go with (set-face-attribute 'blamer-face nil :height 0.6) which I like even more as it makes the annotations less pronounced.

Another related effect is that while doing a mouse drag to select a region, then annotations will be permanently added (or removed) according to which lines are currently selected. Due to increasing line length, additional line-breaks will also be inserted which unfortunately leads to uneasy dynamics of the view and also increases (or decreases) the height of the region at the bottom, which makes it difficult to properly set the intended end of the region by releasing the mouse. This is probably not easy to resolve. Maybe by truncating annotations to not extend beyond window width (temporarily during mouse dragging).

Artawower commented 3 years ago

Did your try to disable truncate-long-lines? And also your can disable blamer for selection mode by setting (setq blamer-type 'visual)

I'll think about truncating line, but i need to resaerch truncate-long-lines functionality (if its a blamer of such behaviour) 😊

dmitrym0 commented 1 year ago

Hey folks,

Even with (set-face-attribute 'blamer-face nil :height 0.6) I see line height increasing. It seems to be proportional, :height 1.0 is pronounced, :height 0.6 is less so but still visible.

Any advice?

Artawower commented 1 year ago

Hey folks,↳

Even with (set-face-attribute 'blamer-face nil :height 0.6) I see line height increasing. It seems to be proportional, :height 1.0 is pronounced, :height 0.6 is less so but still visible.↳

Any advice?↳

Hey! try to remove icon from blamer-commit-formatter variable. Something like that (setq blamer-commit-formatter "%s"). Problem still exists?

dmitrym0 commented 1 year ago

Hey! try to remove icon from blamer-commit-formatter variable. Something like that (setq blamer-commit-formatter "%s"). Problem still exists?

Brilliant! I was looking at it but it never clicked. Fixed!