Consider using Linguist's programming language metadata #14032

Closed
opened 2025-11-02 11:00:50 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @silverwind on GitHub (Jan 23, 2025).

Feature Description

Linguist is the ruby module that GitHub uses for programming language metadata. While we can not use it directly in golang, we can make use of this yaml file, which arguably is the most complete programming language metadata available on the internet:

https://github.com/github-linguist/linguist/blob/main/lib/linguist/languages.yml

This file could be synced regularily and could be used in many places like language color and file extensions, replacing or supplementing existing inaccurate mechanisms.

Originally created by @silverwind on GitHub (Jan 23, 2025). ### Feature Description [Linguist](https://github.com/github-linguist/linguist) is the ruby module that GitHub uses for programming language metadata. While we can not use it directly in golang, we can make use of this yaml file, which arguably is the most complete programming language metadata available on the internet: https://github.com/github-linguist/linguist/blob/main/lib/linguist/languages.yml This file could be synced regularily and could be used in many places like language color and file extensions, replacing or supplementing existing inaccurate mechanisms.
GiteaMirror added the type/proposal label 2025-11-02 11:00:50 -06:00
Author
Owner

@techknowlogick commented on GitHub (Jan 23, 2025):

This is the metadata that go-enry uses

@techknowlogick commented on GitHub (Jan 23, 2025): This is the metadata that go-enry uses
Author
Owner

@silverwind commented on GitHub (Jan 23, 2025):

Ah, alright, I forgot. Then this likely obsolete.

@silverwind commented on GitHub (Jan 23, 2025): Ah, alright, I forgot. Then this likely obsolete.
Author
Owner

@silverwind commented on GitHub (Jan 24, 2025):

I guess the actual problem is that chroma maintains its own incomplete language metadata, so ideally chroma should have a dependency on enry to obtain filename patterns and such. I actually had already opened an issue on it: https://github.com/alecthomas/chroma/issues/931.

Ohn and enry seems to lag behind linguist quite a bit.

@silverwind commented on GitHub (Jan 24, 2025): I guess the actual problem is that chroma maintains its own incomplete language metadata, so ideally chroma should have a dependency on enry to obtain filename patterns and such. I actually had already opened an issue on it: https://github.com/alecthomas/chroma/issues/931. Ohn and enry seems to lag behind linguist quite a bit.
Author
Owner

@techknowlogick commented on GitHub (Jan 24, 2025):

Ohn and Enry seem to lag behind linguists quite a bit.

@lafriks is there anything we can do to help out there? I think you are a maintainer of that lib.

@techknowlogick commented on GitHub (Jan 24, 2025): > Ohn and Enry seem to lag behind linguists quite a bit. @lafriks is there anything we can do to help out there? I think you are a maintainer of that lib.
Author
Owner

@lafriks commented on GitHub (Jan 24, 2025):

@techknowlogick I will try to talk to the maintainer about him adding me more rights to the project as he himself seems to have very limited time for project

@lafriks commented on GitHub (Jan 24, 2025): @techknowlogick I will try to talk to the maintainer about him adding me more rights to the project as he himself seems to have very limited time for project
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14032