Adding Official GitHub Syntax Highlighting for .prompt Files
To get native syntax highlighting for .prompt files on GitHub (beyond the current YAML fallback), you need to submit a Pull Request to the GitHub Linguist repository.
1. Information for languages.yml
Add the following entry to lib/linguist/languages.yml in the Linguist repository:
Dotprompt:
type: programming
color: "#ff5a00"
extensions:
- .prompt
tm_scope: source.dotprompt
ace_mode: text
language_id: <NEW_ID> # Linguist maintainers will provide or you can pick a high random number
2. Grammar Reference
Linguist uses TextMate grammars. Point them to the grammar already defined in this repository:
packages/vscode/syntaxes/dotprompt.tmLanguage.json
3. Sample Files
Linguist requires sample files for testing. You should include 2-3 files from the examples/ directory in this repo, such as:
examples/basic.prompt
examples/history.prompt
These should be placed in samples/Dotprompt/ in the Linguist repository.
4. PR Process
- Fork
github-linguist/linguist.
- Add the language definition to
lib/linguist/languages.yml.
- Add the sample files to
samples/Dotprompt/.
- Run their test suite (usually
bundle exec rake test) to ensure the samples are correctly identified.
- Submit the PR.
Once the PR is merged and deployed by GitHub, you can remove the *.prompt linguist-language=yaml line from the root .gitattributes file in this repository.
Adding Official GitHub Syntax Highlighting for .prompt Files
To get native syntax highlighting for
.promptfiles on GitHub (beyond the current YAML fallback), you need to submit a Pull Request to the GitHub Linguist repository.1. Information for
languages.ymlAdd the following entry to
lib/linguist/languages.ymlin the Linguist repository:2. Grammar Reference
Linguist uses TextMate grammars. Point them to the grammar already defined in this repository:
packages/vscode/syntaxes/dotprompt.tmLanguage.json3. Sample Files
Linguist requires sample files for testing. You should include 2-3 files from the
examples/directory in this repo, such as:examples/basic.promptexamples/history.promptThese should be placed in
samples/Dotprompt/in the Linguist repository.4. PR Process
github-linguist/linguist.lib/linguist/languages.yml.samples/Dotprompt/.bundle exec rake test) to ensure the samples are correctly identified.Once the PR is merged and deployed by GitHub, you can remove the
*.prompt linguist-language=yamlline from the root.gitattributesfile in this repository.