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 py, hs, rs and typ injection regexes #10785

Merged
merged 3 commits into from
Jun 7, 2024

Conversation

tingerrr
Copy link
Contributor

@tingerrr tingerrr commented May 17, 2024

This PR adds py as a valid injection regex for Python. py is a valid key for various highlighter implementations. The most glaring example being the one used on GitHub itself:

```py
print()
```

being

print()

EDIT:

I noticed the lack of hs for Haskell and rs for Rust, which are also very common, so I added those too.

EDIT2:

I've also added typ for typst.

@tingerrr tingerrr changed the title Add py as valid python injection regex Add py, hs and rs injection regexes May 17, 2024
@kirawi kirawi added A-language-support Area: Support for programming/text languages C-enhancement Category: Improvements labels May 18, 2024
the-mikedavis
the-mikedavis previously approved these changes Jun 3, 2024
@tingerrr
Copy link
Contributor Author

tingerrr commented Jun 3, 2024

Pardon me for the late change after the review, but I noticed today that we also missed typ for typst, for similar reasons, as this is used as its extension.

@tingerrr tingerrr changed the title Add py, hs and rs injection regexes Add py, hs, rs and typ injection regexes Jun 3, 2024
@archseer archseer merged commit 80e0e98 into helix-editor:master Jun 7, 2024
6 checks passed
Vulpesx pushed a commit to Vulpesx/helix that referenced this pull request Jun 7, 2024
* Add `py` as valid python injection regex

* Add `hs` and `rs` for `haskell` and `rust`

* Add `typ` injection regex for `typst`
@tingerrr tingerrr deleted the patch-1 branch June 8, 2024 19:09
AOx0 pushed a commit to AOx0/helix that referenced this pull request Jun 15, 2024
* Add `py` as valid python injection regex

* Add `hs` and `rs` for `haskell` and `rust`

* Add `typ` injection regex for `typst`
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 2024
* Add `py` as valid python injection regex

* Add `hs` and `rs` for `haskell` and `rust`

* Add `typ` injection regex for `typst`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages C-enhancement Category: Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants