I came across The case of git-gutter, the modus-themes, and Doom
Emacs[1] and the documentation note for the issue of doom and
modus-themes. None of the provided solution worked.
However, evaluating:
(modus-themes-with-colors
(custom-set-faces
;; Replace green with blue if you use `modus-themes-deuteranopia'.
`(git-gutter-fr:added ((,class :foreground ,green-fringe-bg)))
`(git-gutter-fr:deleted ((,class :foreground ,red-fringe-bg)))
`(git-gutter-fr:modified ((,class :foreground ,yellow-fringe-bg)))))
Worked fine. Note: this uses ",class" instead of ",c" (perhaps this
needs to be modified in the docs?), which didn't work. I tried both
loading this block using after!, add-hook!, and add-hook but none worked
for me (it didn't work in the sense that doom failed to load, it loads
but once the frame launches doom crashes with no error message. doom doc
does not report anything either).
Finally I tried:
(after! git-gutter
(modus-themes-with-colors
(custom-set-faces
;; Replace green with blue if you use `modus-themes-deuteranopia'.
`(git-gutter-fr:added ((,class :foreground ,green-fringe-bg)))
`(git-gutter-fr:deleted ((,class :foreground ,red-fringe-bg)))
`(git-gutter-fr:modified ((,class :foreground ,yellow-fringe-bg))))))
Which works fine for me. I suggest adding this to the documentation as
worth trying.
[1]: https://protesilaos.com/codelog/2022-08-04-doom-git-gutter-modus-themes/
--
Regards,
Salih
Hello Salih,
Thank you for taking the time to mention this!
> From: Salih Muhammed <lr0@gmx.com>> Date: Sun, 29 Oct 2023 11:11:04 +0200>> I came across The case of git-gutter, the modus-themes, and Doom> Emacs[1] and the documentation note for the issue of doom and> modus-themes. None of the provided solution worked.>> However, evaluating:>> (modus-themes-with-colors> (custom-set-faces> ;; Replace green with blue if you use `modus-themes-deuteranopia'.> `(git-gutter-fr:added ((,class :foreground ,green-fringe-bg)))> `(git-gutter-fr:deleted ((,class :foreground ,red-fringe-bg)))> `(git-gutter-fr:modified ((,class :foreground ,yellow-fringe-bg)))))
Do you know which version of the themes you are using? The above code
should not work with the current version or anything after v4.0.0.
> Worked fine. Note: this uses ",class" instead of ",c" (perhaps this> needs to be modified in the docs?), which didn't work. I tried both> loading this block using after!, add-hook!, and add-hook but none worked> for me (it didn't work in the sense that doom failed to load, it loads> but once the frame launches doom crashes with no error message. doom doc> does not report anything either).
The ,class was the old convention and I made the change to ,c for me to
easily get a sense of which version the code is using. You probably are
using the modus-themes that are built into Emacs 28 or 29, which are
older than what is documented in the manual.
> Finally I tried:>> (after! git-gutter> (modus-themes-with-colors> (custom-set-faces> ;; Replace green with blue if you use `modus-themes-deuteranopia'.> `(git-gutter-fr:added ((,class :foreground ,green-fringe-bg)))> `(git-gutter-fr:deleted ((,class :foreground ,red-fringe-bg)))> `(git-gutter-fr:modified ((,class :foreground ,yellow-fringe-bg))))))>> Which works fine for me. I suggest adding this to the documentation as> worth trying.>> [1]: https://protesilaos.com/codelog/2022-08-04-doom-git-gutter-modus-themes/
The current version of the manual has a code block like that, except it
references the new names of the colours to use. If you update the
modus-themes package, make sure to check it. From Emacs, evaluate:
(info "(modus-themes) Note on git-gutter in Doom Emacs")
Or visit:
https://protesilaos.com/emacs/modus-themes#h:a195e37c-e58c-4148-b254-8ba1ed8a731a
All the best,
Protesilaos (or simply "Prot")
--
Protesilaos Stavrou
https://protesilaos.com
> Do you know which version of the themes you are using? The above code> should not work with the current version or anything after v4.0.0.> The current version of the manual has a code block like that, except it> references the new names of the colours to use. If you update the> modus-themes package, make sure to check it. From Emacs, evaluate:>> (info "(modus-themes) Note on git-gutter in Doom Emacs")>> Or visit:>> https://protesilaos.com/emacs/modus-themes#h:a195e37c-e58c-4148-b254-8ba1ed8a731a
Right! I just updated to version 4, I've to tell you it's amazing!
--
Regards,
Salih
> From: Salih Muhammed <lr0@gmx.com>> Date: Wed, 29 Nov 2023 03:22:48 +0200>>> Do you know which version of the themes you are using? The above code>> should not work with the current version or anything after v4.0.0.>>> The current version of the manual has a code block like that, except it>> references the new names of the colours to use. If you update the>> modus-themes package, make sure to check it. From Emacs, evaluate:>>>> (info "(modus-themes) Note on git-gutter in Doom Emacs")>>>> Or visit:>>>> https://protesilaos.com/emacs/modus-themes#h:a195e37c-e58c-4148-b254-8ba1ed8a731a>> Right! I just updated to version 4, I've to tell you it's amazing!
Good to know, thanks!
--
Protesilaos Stavrou
https://protesilaos.com