Theia: Syntax highlighting for `.patch` and `.diff` files

Created on 14 Oct 2019  路  4Comments  路  Source: eclipse-theia/theia

Description

When working with .patch or .diff files, it's nicer when they are syntax-highlighted (e.g. showing +-prefixed lines in green and --prefixed lines in red).

Reproduction Steps

  1. Create a patch file, e.g. with git show > head.patch
  2. Open it in an editor
  3. There is no syntax highlighting

OS and Theia version: latest

Diagnostics:

git question

Most helpful comment

All 4 comments

I would say it should be a VS Code extension if there is no one already.

FYI it's already handle by vscode git built-in extension https://github.com/microsoft/vscode/blob/9e5c2aca237a67243cb407f77dedc7dd28fc88ea/extensions/git/package.json#L1535-L1538

Oh, cool! But then it means that there is a bug in Theia, right? I.e. .patch and .diff files should be syntax-colored by the built-in extension, but when you try it, they're not?

hello @jankeromnes
AFAIK theia examples are using the "home made" git extension and not VS Code git extension.

https://github.com/eclipse-theia/theia/tree/master/packages/git

Was this page helpful?
0 / 5 - 0 ratings