github-linguist / github-linguist/linguist

Add Language: USD

Open
#6,383 0 comments 3 reactions 0 assignees View on GitHub
Add Language Good First Issue
Dominant language
Ruby
Stars
13.7k
Forks
5.4k
Avg merge
1d 15h
Merged PRs (30d)
17

Description

## Language name
[USD](https://www.pixar.com/usd), developed by Pixar Animation Studios

## URL of example repository
https://github.com/PixarAnimationStudios/USD - [Example](https://github.com/PixarAnimationStudios/USD/blob/3b097e3ba8fabf1777a1256e241ea15df83f3065/pxr/usd/usdMtlx/testenv/testUsdMtlxFileFormat.testenv/baseline/NodeGraphs.usda)

https://github.com/ColinKennedy/USD-Cookbook - See any `**/usda` folder for examples. [Here's an example](https://github.com/ColinKennedy/USD-Cookbook/blob/master/features/asset_info/usda/asset_info.usda)

## URL of syntax highlighting grammar
### Tree-sitter
https://github.com/ColinKennedy/tree-sitter-usd

### VSCode
https://github.com/AnimalLogic/AL_usd_vscode_extension

### Pygments
[General Syntax](https://github.com/pygments/pygments/blob/a1361035ec5f599290371f7df9f21e3f1f1420a6/pygments/lexers/usd.py)
[List Of Keywords](https://github.com/pygments/pygments/blob/a1361035ec5f599290371f7df9f21e3f1f1420a6/pygments/lexers/_usd_builtins.py)
Full disclosure, I wrote this lexer and it isn't perfect (for example, not catching `.connect` as part of an attribute name). [Screenshot of what the looks like, here](https://github.com/github/linguist/assets/10103049/736b2584-7f1e-45c9-9e08-bc6e00da2094)

### Text Editors
[A simpler, regex-based example](https://github.com/superfunc/usda-syntax)
Vim's example some small issues in my experience but it works pretty well overall

## Most popular extensions
- [.usd](https://github.com/search?q=extension%3Ausd) (7K+)
- [.usda](https://github.com/search?q=extension%3Ausda) (13K+)
- [.usdc](https://github.com/search?q=extension%3Ausdc) (3.9K+)

## Grammar Features
[This gist](https://gist.github.com/ColinKennedy/1997d1f0850031d22245f529cd92872f) shows a fairly complex USD file and some of its syntax features.

## Detected language
None

Contributor guide

Open the contributing guide

Research direction

Start by reviewing existing language-addition entry points and tests in Linguist, then compare the USD and USDA examples with the linked Tree-sitter, VSCode, and Pygments grammars. Done means USD-related files are detected and highlighted consistently for the listed extensions, with coverage for representative syntax.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.