Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please include colors for diffs #27

Open
ThiefMaster opened this issue Jan 28, 2021 · 1 comment
Open

Please include colors for diffs #27

ThiefMaster opened this issue Jan 28, 2021 · 1 comment

Comments

@ThiefMaster
Copy link

When viewing a .diff/.patch file there is currently no syntax highlighting - and since vscode doesn't have an option to use a different theme for certain file types I currently need to change the global theme away from this one temporarily if I want to view a diff file properly...

@rosahbruno
Copy link

@ThiefMaster
I was able to fix this by just copying in patch colors from a different theme. You can just add this in your user settings.json.

"editor.tokenColorCustomizations": {
  "[Darcula]": {
    "textMateRules": [
      {
        "name": "markup diff",
        "scope": "markup.changed.diff",
        "settings": {
          "foreground": "#e5c07b"
        }
      },
      {
        "name": "diff",
        "scope": "meta.diff.header.from-file,meta.diff.header.to-file,punctuation.definition.from-file.diff,punctuation.definition.to-file.diff",
        "settings": {
          "foreground": "#61afef"
        }
      },
      {
        "name": "inserted.diff",
        "scope": "markup.inserted.diff",
        "settings": {
          "foreground": "#98c379"
        }
      },
      {
        "name": "deleted.diff",
        "scope": "markup.deleted.diff",
        "settings": {
          "foreground": "#e06c75"
        }
      }
    ]
  }
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants