GitHunt
QS

qsharp-community/qsharp-tmLanguage

Q# syntax grammar for code highlighting

Q# language - syntax grammar for code highlighting

This repository contains the TextMate grammar for Q#. The grammar provides tokenization support for Q# language files, and can be used for syntax highlighting of Q# code in any editor.

CoC

Build and Development

To contribute, clone the repo and run (requires Node.js and npm to be installed on the dev machine)

  • npm install to install all dependencies
  • Run npm run compile to build and run tests
  • Run npm run test to run only tests

The source grammar is located at src/qsharp.tmLanguage.yml and is the core file to be maintained.

Output

The output are the grammar files located at:

  • grammars/qsharp.tmLanguage
  • grammars/qsharp.tmLanguage.json

These two files are committed to source control to allow easy access to latest grammars, but they should not be edited by hand.

The latest ones can be grabbed manually from here and used directly in any editor supporting TextMate grammar.

License

MIT License

Languages

TypeScript97.3%JavaScript2.7%

Contributors

MIT License
Created June 15, 2022
Updated January 12, 2025
qsharp-community/qsharp-tmLanguage | GitHunt