Repository: sharkdp/bat (language: rust)

Issue:
Syntax highlighting for `textproto`
`bat` already digs `.proto` (which is the schema language of https://protobuf.dev).

`.textproto` is a file format for representation of protobuf data in text format, see https://protobuf.dev/reference/protobuf/textformat-spec/.

The goal of this issue would be to add syntax highlighting support for that format.

I dunno if e.g. https://github.com/VcamX/protobuf-syntax-highlighting could be helpful for someone interested to implement this.
Syntax highlighting for `textproto`
`bat` already digs `.proto` (which is the schema language of https://protobuf.dev).

`.textproto` is a file format for representation of protobuf data in text format, see https://protobuf.dev/reference/protobuf/textformat-spec/.

The goal of this issue would be to add syntax highlighting support for that format.

I dunno if e.g. https://github.com/VcamX/protobuf-syntax-highlighting could be helpful for someone interested to implement this.


Discussion / hints:
Text proto is already supported, but not with the `.textproto` extension:

```
$ bat -L | grep 'Protocol Buffer (TEXT)'
Protocol Buffer (TEXT):pb.txt,proto.text,textpb,pbtxt,prototxt
```

I created https://github.com/VcamX/protobuf-syntax-highlighting/pull/11 to add support for it in the underlying syntax spec.
Update: the change just got merged: https://github.com/VcamX/protobuf-syntax-highlighting/commit/1365331580b0e4bb86f74d0c599dccc87e7bdacb
@bluec0re cool, thanks! However this doesn't seem to work on v0.24.0 released on Oct 11, 2023 (after your PR above from August).

I suspected that some version may have to be bumped, but [this](https://github.com/sharkdp/bat/blob/f8c5429a6c5377d854908a542907a1a8197b91ec/.gitmodules#L94) looks like it's just pulling `master` (as a sob-module), so not sure what's "missing".

```bash
$  bat --version
bat 0.24.0

$  bat -L | grep 'Protocol Buffer (TEXT)'
Protocol Buffer (TEXT):pb.txt,proto.text,textpb,pbtxt,prototxt
```
Hm, indeed... didn't notice as I added the textproto extension to my config file:

```
--map-syntax "*.textproto:Protocol Buffer (TEXT)"
```

But the commit needs to be bumped in this repository as well: https://github.com/sharkdp/bat/tree/master/assets/syntaxes/02_Extra/Protobuf still points to [726e21d](https://github.com/VcamX/protobuf-syntax-highlighting/tree/726e21d74dac23cbb036f2fbbd626decdc954060)
Text proto is already supported, but not with the `.textproto` extension:

```
$ bat -L | grep 'Protocol Buffer (TEXT)'
Protocol Buffer (TEXT):pb.txt,proto.text,textpb,pbtxt,prototxt
```

I created https://github.com/VcamX/protobuf-syntax-highlighting/pull/11 to add support for it in the underlying syntax spec.
Update: the change just got merged: https://github.com/VcamX/protobuf-syntax-highlighting/commit/1365331580b0e4bb86f74d0c599dccc87e7bdacb
@bluec0re cool, thanks! However this doesn't seem to work on v0.24.0 released on Oct 11, 2023 (after your PR above from August).

I suspected that some version may have to be bumped, but [this](https://github.com/sharkdp/bat/blob/f8c5429a6c5377d854908a542907a1a8197b91ec/.gitmodules#L94) looks like it's just pulling `master` (as a sob-module), so not sure what's "missing".

```bash
$  bat --version
bat 0.24.0

$  bat -L | grep 'Protocol Buffer (TEXT)'
Protocol Buffer (TEXT):pb.txt,proto.text,textpb,pbtxt,prototxt
```
Hm, indeed... didn't notice as I added the textproto extension to my config file:

```
--map-syntax "*.textproto:Protocol Buffer (TEXT)"
```

But the commit needs to be bumped in this repository as well: https://github.com/sharkdp/bat/tree/master/assets/syntaxes/02_Extra/Protobuf still points to [726e21d](https://github.com/VcamX/protobuf-syntax-highlighting/tree/726e21d74dac23cbb036f2fbbd626decdc954060)

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7e361ddb91..8bb7a57914 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -52,6 +52,7 @@
 - Added auto detect syntax for `.jsonc` #2795 (@mxaddict)
 - Added auto detect syntax for `.aws/{config,credentials}` #2795 (@mxaddict)
 - Add syntax mapping for Wireguard config #2874 (@cyqsimon)
+- Associate `.textproto` files with `ProtoBuf` syntax, see #3038 (@vorburger).
 
 ## Themes
 
diff --git a/assets/syntaxes/02_Extra/Protobuf b/assets/syntaxes/02_Extra/Protobuf
index 726e21d74d..1365331580 160000
--- a/assets/syntaxes/02_Extra/Protobuf
+++ b/assets/syntaxes/02_Extra/Protobuf
@@ -1,1 +1,1 @@
-Subproject commit 726e21d74dac23cbb036f2fbbd626decdc954060
+Subproject commit 1365331580b0e4bb86f74d0c599dccc87e7bdacb


Test patch: