Skip to content

Commit 2f5b012

Browse files
authored
Add file icons for Protobuf and Buf configuration files (#452)
This PR adds file icons for protobuf files and buf configuration files through the VS Code extension. The VS Code extension will use the icons provided by the languages configuration if the underlying icon theme does not provide icons for the given language IDs, so buf files use the `buf` language ID. Fixes #396 <img width="273" height="779" alt="Screenshot 2025-09-10 at 10 30 07" src="https://github.com/user-attachments/assets/c38a1c8f-ad02-417a-a30f-fb630652e62f" /> <img width="261" height="789" alt="Screenshot 2025-09-10 at 10 29 54" src="https://github.com/user-attachments/assets/5ec309bf-e3c7-4f32-857f-796bc2cae5ff" />
1 parent 1df60df commit 2f5b012

File tree

5 files changed

+33
-6
lines changed

5 files changed

+33
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Unreleased
44

5-
- No changes yet.
5+
- Add file icons for Protobuf and Buf configuration files.
66

77
## 0.8.1
88

icons/_buf_file.svg

Lines changed: 10 additions & 0 deletions
Loading

icons/_proto_file_dark_mode.svg

Lines changed: 4 additions & 0 deletions
Loading

icons/_proto_file_light_mode.svg

Lines changed: 4 additions & 0 deletions
Loading

package.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,18 @@
244244
],
245245
"languages": [
246246
{
247-
"id": "yaml",
247+
"id": "buf",
248248
"filenames": [
249+
"buf.yaml",
250+
"buf.gen.yaml",
249251
"buf.lock",
250252
"buf.mod",
251-
"buf.work",
252-
"buf.gen"
253-
]
253+
"buf.work"
254+
],
255+
"icon": {
256+
"light": "./icons/_buf_file.svg",
257+
"dark": "./icons/_buf_file.svg"
258+
}
254259
},
255260
{
256261
"id": "proto",
@@ -261,7 +266,11 @@
261266
"Protocol Buffers",
262267
"Protobuf"
263268
],
264-
"configuration": "./protobuf-language-configuration.json"
269+
"configuration": "./protobuf-language-configuration.json",
270+
"icon": {
271+
"light": "./icons/_proto_file_light_mode.svg",
272+
"dark": "./icons/_proto_file_dark_mode.svg"
273+
}
265274
},
266275
{
267276
"//": "This is a special language used by the 'declaration' part of hover inlays in Markdown.",

0 commit comments

Comments
 (0)