-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
Description
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 number2. 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.promptexamples/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.
Reactions are currently unavailable