dgutov / diff-hl

Emacs package for highlighting uncommitted changes
GNU General Public License v3.0
914 stars 44 forks source link

Margin mode not working #216

Closed LionyxML closed 6 months ago

LionyxML commented 6 months ago

Melpa version diff-hl-20240225.116.

Something seems wrong with diff-hl-margin-mode.

It was working ok, I updated to current version on MELPA and it stopped working.

My configuration:

(use-package diff-hl
  :defer t
  :ensure t
  :custom
  (diff-hl-margin-mode t)
  (diff-hl-side 'left)
  (diff-hl-margin-symbols-alist
   '((insert . " ")
     (delete . " ")
     (change . " ")
     (unknown . " ")
     (ignored . " ")))
  :bind
  (("M-9" . 'diff-hl-previous-hunk)
   ("M-0" . 'diff-hl-next-hunk))
  :config)

No errors are shown on Messages.

Any help?

dgutov commented 6 months ago

Hi!

That's a little odd: I'm running the current master, and switching diff-hl-margin-mode seems to function as expected.

Have you tried reproducing this starting with emacs -Q? Is the above config enough to show the problem?

LionyxML commented 6 months ago

Well, it took some time, but I managed diff-hl to work with emacs -Q and yeah, this is working.

Something else in my config is breaking it :(

dgutov commented 6 months ago

Perhaps that other thing that you mentioned, that also uses the margin?

LionyxML commented 6 months ago

@dgutov sorry man. My bad.

Actually not "mine", but.

Well, take a look at here: https://github.com/catppuccin/emacs/pull/141 please.

Catppuccin changed the theme so the background would be inherited from fringe.

As I was using ONLY the background and no chars (A hack to diff-hl work "barring" on both GUI/TUI), it looked invisible to me.

dgutov commented 6 months ago

Ah, all right. I noticed that the marks are a little harder to see with your customization (with backgrounds from the default theme), but didn't think theme could be the cause. Anyway, good you found it.

If the theme doesn't revert the change, you can customize the faces for your personal config, it's not too difficult. LMK if you meet any problems doing that.