emacs icon indicating copy to clipboard operation
emacs copied to clipboard

magit merge conflict color seem to be different color compared to vscode

Open wingyplus opened this issue 5 years ago • 6 comments

From VSCode, I see merge conflict diss color like this:

Screen Shot 2563-09-25 at 17 56 34

But on Emacs:

Screen Shot 2563-09-25 at 17 55 46

wingyplus avatar Sep 25 '20 10:09 wingyplus

Hi @wingyplus :wave:, thanks for your contribution :+1:

The difference between some ports is often due to the fact that some features are not always part of the application core like in this example Magit which is a third-party package. In #27 the support for Magit was already requested, but there hasn't been a PR. I'm not a Emcas user myself and since my free time I can spend on open source is limited and there are hundreds of other tasks the request is still pending. Feel free to submit a PR to implement the required style faces, every contribution is always welcome 😊


Related to or duplicate of #27

arcticicestudio avatar Sep 26 '20 19:09 arcticicestudio

@arcticicestudio Thanks for your reply. I'll take a look what I can do with this. :)

wingyplus avatar Sep 28 '20 14:09 wingyplus

I just update on my research. It seems we need to decorate smerge theme. In the image below, I custom smerge-refined-added to use nord7. It's works but the color look hard to read.

Screen Shot 2563-10-03 at 20 44 24

wingyplus avatar Oct 03 '20 13:10 wingyplus

Add 3 lines for smerge to the same diff looks better.

    ;; > smerge
    `(smerge-refined-added ((,class (:foreground ,nord14))))
    `(smerge-refined-changed ((,class (:foreground ,nord13))))
    `(smerge-refined-removed ((,class (:foreground ,nord11))))

Screen Shot 2563-10-03 at 21 22 07

wingyplus avatar Oct 03 '20 14:10 wingyplus

Compare to diff in magit-show-commit. The result from previous comment looks very weired. 🤔

Screen Shot 2563-10-03 at 21 24 41

wingyplus avatar Oct 03 '20 14:10 wingyplus

In order to achieve the same style like in VS Code, the background color must be "semi-transparent" by making use of the alpha layer value, but I'm not sure if it is supported by Emacs. We need to add new color variables which use the RGBA color model.

arcticicestudio avatar Nov 07 '20 10:11 arcticicestudio