Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Jsonnet to Pygments #83

Closed
davidzchen opened this issue Nov 30, 2015 · 7 comments
Closed

Add support for Jsonnet to Pygments #83

davidzchen opened this issue Nov 30, 2015 · 7 comments

Comments

@davidzchen
Copy link
Contributor

It would be nice to add Jsonnet highlighting to Pygments so that we can have syntax highlighting for Jsonnet code in Markdown fenced code blocks in static site generators such as Jekyll, which is also used for GitHub pages:

```jsonnet
{
  local Foo = {
    bar: "Some jsonnet code here"
  },
  baz: Foo {
    bar: "nicely syntax highlighted"
  }
}
```
@mikedanese
Copy link
Contributor

Also adding a "grammar" to https://github.com/github/linguist would give syntax highlighting in github file view.

@davidzchen
Copy link
Contributor Author

#23 tracks adding Jsonnet support to Linguist, and we sent a pull request github-linguist/linguist#2653, but at the time, there were not enough Jsonnet files in GitHub repositories.

Perhaps we should revisit that PR in the near future.

@sh0rez
Copy link

sh0rez commented Mar 25, 2020

github-linguist/linguist#4455 has been merged nearly a year ago, I guess we can close this!

@sbarzowski
Copy link
Collaborator

@sh0rez Github support is there, but AFAICT we don't have support in Pygments (see: https://pygments.org/languages/).

@sh0rez
Copy link

sh0rez commented Mar 25, 2020

Oh right, this was about Pygments as well. Ignore me 🤪

@bgagnon
Copy link

bgagnon commented Jun 1, 2020

Jsonnet is supported by Rouge (demo: http://rouge.jneen.net/v3.19.0/jsonnet/) and there are IDE-specific implementations for VSCode, Jetbrains and Atom. But no Pygments :(

Personally, I'd like to have this for Mkdocs.

@AndrewEckart
Copy link

AndrewEckart commented Mar 1, 2023

This was completed in pygments/pygments#2239

The change was released in Pygments version 2.14: https://pygments.org/docs/changelog/#version-2-14-0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants