Sublime Forum

CODEOWNERS syntax highlighter

#1

Hi guys, I can’t find any sublime syntax highlighter for GitHub’s CODEOWNERS file. Does one exist at all?
Here’s the CODEOWNERS doc: https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
And how GitHub highlights the syntax: https://github.com/dotnet/samples/blob/main/.github/CODEOWNERS

0 Likes

#2

it seems the closest one can get out of the box is the Git Ignore syntax, but it scopes/highlights the usernames the same as the globs:

0 Likes

#3

The gitignore syntax isn’t good enough, the point is to have different colours for the dirs and owners. Nevertheless, your answer prompted me to search for some other highlighter that would coincidentally fix my problem, and so I found this solution. Thanks!

0 Likes

#4

Git Formats syntaxes use entity.name for both, patterns and names/emails, which means them to be tinted equally by most color schemes even if a syntax correctly scopes them.

Maybe we need to revise scopes somehow.

0 Likes