Add SpiceDB Schema language support#7936
Merged
lildude merged 2 commits intogithub-linguist:mainfrom May 1, 2026
Merged
Conversation
338d307 to
c21d498
Compare
lildude
reviewed
May 1, 2026
| ace_mode: text | ||
| language_id: 354 | ||
| SpiceDB Schema: | ||
| type: programming |
Member
There was a problem hiding this comment.
Schema is generally considered data and not a programming language.
Suggested change
| type: programming | |
| type: data |
Contributor
Author
There was a problem hiding this comment.
Good call. Applied in the latest force-push (b337609).
Member
Nope. That's showing repos with zed in their name or description 😁 Usage looks good as it appears there is only ever one of these files per repo, so it's just the type that needs changing. |
c21d498 to
b337609
Compare
Contributor
Author
|
Good catch on the search URL - you're right. I fixed the PR description. Thanks for the quick review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add SpiceDB Schema (
.zed) as a new data language.SpiceDB is an open-source permissions database. The schema describes object types, the relations between them, and the permissions derived from those relations, plus CEL-based caveats for contextual constraints. Used by teams at Red Hat, Oviva, Raystack, and others (see the repo list below for specifics).
Two things worth flagging up front:
1b3f6dbinstead of thev1.1.1tag because that commit (authzed/spicedb-vscode#65) fixes a regex that wasn't valid PCRE, which linguist's grammar-compiler needs. Will be in a future upstream release.grammars.ymllists two scopes (source.celandsource.spicedb) for one new language. CEL is embedded inside SpiceDB caveats, so the upstream grammar ships bothcel.tmGrammar.jsonandspicedb.tmGrammar.json. CEL isn't added tolanguages.yml; the second scope just registers the bundled grammar file. Nothing else ingrammars.ymlclaims either scope..zedis also used by Brim Data's Zed shape language, which isn't currently in linguist. If it's added later, thedefinition/permission/relation/caveatkeywords should be enough to disambiguate.Checklist:
gh api /search/code?q=extension:zed+definition): 307 SpiceDB-flavored files (one.zedschema per repo is the norm, so this also approximates the unique-repo count).oviva.zed: https://github.com/oviva-ag/spicegen/blob/main/parser/fixtures/oviva.zedschema.zed: https://github.com/project-kessel/relations-api/blob/main/deploy/hbi/schema.zedoviva.zed: Apache-2.0schema.zed: Apache-2.0#a5318aMagenta 600from the official AuthZed brand palette at https://authzed.com/brand (alongsideRed 500 #f0566dandSand 300 #ffb370). The 600 step is designed to clear contrast checks on light backgrounds, which matches how GitHub renders language-color dots. Visually distinct from existing linguist entries..zedisn't currently mapped to any language in linguist, so no heuristic is needed (see the Brim Zed note above for what to do if that changes).Some
.zedrepos for contextsamples/SpiceDB Schema/oviva.zed.samples/SpiceDB Schema/schema.zed..zedschema parser