Skip to content

Use rust syntax highlighting for .nr files in this repo#541

Merged
jfecher merged 1 commit intomasterfrom
jf/noir-syntax-highlighting
Dec 2, 2022
Merged

Use rust syntax highlighting for .nr files in this repo#541
jfecher merged 1 commit intomasterfrom
jf/noir-syntax-highlighting

Conversation

@jfecher
Copy link
Contributor

@jfecher jfecher commented Nov 30, 2022

Related issue(s)

No issue exists for this - it is a minor, quick change.

Description

Summary of changes

Noir files (*.nr) currently have no syntax highlighting when viewing them on github. This PR hints to github that it should use rust syntax highlighting for these files instead - which should be close enough.

Checklist

  • I have tested the changes locally.
    • Cannot test these changes locally, it is on github only. It works for me in other repositories though.
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.

@guipublic
Copy link
Contributor

Does it means that noir programs will count as rust language or could we define the noir language in github by duplicating the rust definition?

@jfecher
Copy link
Contributor Author

jfecher commented Nov 30, 2022

Within this repo, github will see noir files as rust language files for the purposes of the "Languages" proportion bar. The only way to create a new language for github to recognize as far as I'm aware is to go through the official process with submitting a request/change for the linguist. So this is the only method I'm aware of to get (a rough estimate of) syntax highlighting locally.

@jfecher jfecher merged commit 375541c into master Dec 2, 2022
@jfecher jfecher deleted the jf/noir-syntax-highlighting branch December 2, 2022 16:49
TomAFrench added a commit to TomAFrench/noir that referenced this pull request Dec 8, 2022
* master:
  Update workflow to run on 20.04 to fix CI (noir-lang#565)
  Split `util` module from noirc_frontend into new crate (noir-lang#560)
  update backend ref (noir-lang#561)
  Tell `clap` to use help text when no subcommand (noir-lang#559)
  moving noirup and build files out to separate repositories (noir-lang#557)
  Make `noirup` pull latest nightly build by default (noir-lang#470)
  Handle predicate operator during inlining (noir-lang#544)
  Add gitattributes (noir-lang#541)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants