Add Vespa Schema Definition language#7880
Open
thomasht86 wants to merge 2 commits intogithub-linguist:mainfrom
Open
Add Vespa Schema Definition language#7880thomasht86 wants to merge 2 commits intogithub-linguist:mainfrom
thomasht86 wants to merge 2 commits intogithub-linguist:mainfrom
Conversation
754671a to
9244b75
Compare
Add Vespa Schema Definition (.sd) as a new programming language with syntax highlighting grammar from vespa-engine/vespa.
9244b75 to
6ab9b22
Compare
lildude
requested changes
Mar 27, 2026
- Remove heuristics for .sd (single-language extension) - Remove corresponding heuristics test - Change type from programming to data
Author
|
Thanks a lot for the quick feedback @lildude! |
Author
|
ping @lildude - any pointer on what needs to be done to get this through? |
Member
|
Popularity is reassessed when preparing for a new release, which happens approximately every 3 months. |
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 Vespa Schema Definition as a new language. Vespa
.sdfiles define document schemas, ranking profiles, and indexing pipelines for the Vespa search engine. The language has programming characteristics — ranking expressions, tensor operations, conditional logic, and ONNX model integration.The grammar lives in the vespa-engine/vespa monorepo at
integration/tmgrammar/grammar/vespa-schema.tmLanguage.json. Since the grammar directory is namedgrammar/(singular) rather than the conventionalgrammars/,"grammar"was added toGrammarsInNonStdPathintools/grammars/compiler/data.go. No other submodules use agrammar/directory with.jsonfiles, so there are no false positives.The
.sdextension is not currently claimed by any other language in linguist. Heuristics are included proactively to match Vespa keywords (schema,document,field,rank-profile).Checklist:
music.sd: https://github.com/vespa-engine/vespa/blob/master/config-model/src/test/derived/music/music.sdmsmarco.sd: https://github.com/vespa-engine/vespa/blob/master/client/go/internal/cli/cmd/testdata/applications/withSource/src/main/application/schemas/msmarco.sdranking.sd: https://github.com/vespa-engine/vespa/blob/master/config-model/src/test/derived/globalphase_token_functions/test.sdintegration/tmgrammar/grammar/vespa-schema.tmLanguage.json)#61D790