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 Nix syntax highlighting #3771

Closed
Septias opened this issue Mar 23, 2024 · 3 comments
Closed

Add Nix syntax highlighting #3771

Septias opened this issue Mar 23, 2024 · 3 comments
Labels
feature request New feature or request

Comments

@Septias
Copy link

Septias commented Mar 23, 2024

Description

I would love to get syntax highlighting for Nix as I currently write my bachelor's thesis about it so I can't get around it. I want to complete it by Wednesday when I submit it; the fastest way is to compile it locally, right? I made this issue on syntect as that is the crate used internally for syntax highlighting

Use Case

Used for everything nix-related.

@Septias Septias added the feature request New feature or request label Mar 23, 2024
@laurmaedje
Copy link
Member

If you have a sublime syntax for it, you can load it at runtime: https://typst.app/docs/reference/text/raw/#parameters-syntaxes

@Septias
Copy link
Author

Septias commented Mar 23, 2024

Thanks for the fast answer. I followed those steps, and it was really easy, actually. It would be even better if it was not already supported, and I just made some syntax errors that broke styling... 😆

@Septias Septias closed this as completed Mar 23, 2024
@PgBiel
Copy link
Contributor

PgBiel commented Mar 24, 2024

I would love to get syntax highlighting for Nix as I currently write my bachelor's thesis about it so I can't get around it.

It appears that Nix syntax highlighting is already natively supported by Typst. Typing

```nix
let x = 5; in x + 5
```

highlights properly for me.

Edit: I'm assuming from your last message that you figured that out, so I'll be leaving this comment here for any possibly confused future readers :p

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

No branches or pull requests

3 participants