Skip to content

Support colorising line line-number-mode rather than writing to the fringe/gutter #124

@sten0

Description

@sten0

@dgutov Continuing from #103

Regarding the coloring of line numbers, I'm not really sure it's possible
(the new feature is implemented on the C level, and it's not very
customizable). You're welcome to file a separate feature request in Emacs
or here (I will pass it on then).

I suspect one of the following two (naïve) approaches would work, since
line-number-mode respects Custom Themes.

  1. If lnm inherits face attributes from the theme, then a theme could
    provide a lnm-specific variable (defaults to inheriting foreground &
    background face from theme). That variable would be dynamically
    modified by diff-hl to indicate state. Lnm would need to be modified
    to use this new theme variable instead of the global foreground &
    background face.

  2. Basically the inverse of the above. Lnm operates at a lower level
    and dumps data which is then rendered by the interface (obviously I
    don't know Emacs internal architecture well at all). In this case Lnm
    would need to be modified to signal to the interface that it's data is
    different (maybe it already does?)...so then it can be rendered using a
    different path. Diff-hl would intercept this data post-custom theming
    but before the interface rendered it, and would overwrite the face
    attributes applied by the custom theme.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions