Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Official Q# syntax file not recognized by GitHub's Linguist #504

@JakuJ

Description

@JakuJ

Is your feature request related to a problem? Please describe.
I'm working on adding Q# support to GitHub's Linguist. In order to add syntax highlighting I need to provide an up-to-date syntax file for the language. I am aware of the one in the VSCode extension directory, however, it's not recognized by the utility that Linguist uses to scrape syntax files from repositories. The issue is that the extension it uses is not valid, and thus the tool cannot find it.

Describe the solution you'd like
I'd like the syntax file in the repository to use one of the extensions that Linguist can recognize, for instance ".tmLanguage" or ".json" (see this function for reference).

Describe alternatives you've considered

  • Using another repository as a source for the syntax file - I've found one, but it's outdated. For instance, the "internal" keyword is still illegal in this one. I'd rather have the syntax come from the official repository for the language.
  • Changing the way Linguist scans repositories for syntax files - it probably makes more sense for the language to adapt to GitHub's standards and not the other way around.

Additional context
I've submitted a pull request (github-linguist/linguist#4901) to Linguist to add Q# as a recognized language. The syntax is not strictly necessary at the time of adding a language, but it'd be nice to have GitHub highlight Q# source files from day one.

I've seen a reference to syntaxes/qsharp.tmLanguage.json in the .gitignore, so I guess the file is generated locally after installing the extension. However, the .template file is a valid syntax file as well (link to Lightshow), so just changing the extension to one that's recognized by Linguist would most likely be enough.

Metadata

Metadata

Assignees

Labels

enhancementNew request or suggestion for an improvement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions