From 80e0e98e45d0f6a6ce1bfdd83d8d1fdedd4c702f Mon Sep 17 00:00:00 2001
From: tingerrr <github@tinger.dev>
Date: Fri, 7 Jun 2024 05:58:26 +0200
Subject: [PATCH] Add `py`, `hs`, `rs` and `typ` injection regexes (#10785)

* Add `py` as valid python injection regex

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

* Add `typ` injection regex for `typst`
---
 languages.toml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/languages.toml b/languages.toml
index 51848b29..e908ea59 100644
--- a/languages.toml
+++ b/languages.toml
@@ -223,7 +223,7 @@ mode = "location"
 [[language]]
 name = "rust"
 scope = "source.rust"
-injection-regex = "rust"
+injection-regex = "rs|rust"
 file-types = ["rs"]
 roots = ["Cargo.toml", "Cargo.lock"]
 shebangs = ["rust-script", "cargo"]
@@ -824,7 +824,7 @@ source = { git = "https://github.com/tree-sitter/tree-sitter-html", rev = "29f53
 [[language]]
 name = "python"
 scope = "source.python"
-injection-regex = "python"
+injection-regex = "py(thon)?"
 file-types = ["py", "pyi", "py3", "pyw", "ptl", "rpy", "cpy", "ipy", "pyt", { glob = ".python_history" }, { glob = ".pythonstartup" }, { glob = ".pythonrc" }, { glob = "SConstruct" }, { glob = "SConscript" }]
 shebangs = ["python"]
 roots = ["pyproject.toml", "setup.py", "poetry.lock", "pyrightconfig.json"]
@@ -1265,7 +1265,7 @@ source = { git = "https://github.com/ikatyang/tree-sitter-yaml", rev = "0e36bed1
 [[language]]
 name = "haskell"
 scope = "source.haskell"
-injection-regex = "haskell"
+injection-regex = "hs|haskell"
 file-types = ["hs", "hs-boot"]
 roots = ["Setup.hs", "stack.yaml", "cabal.project"]
 comment-token = "--"
@@ -3155,7 +3155,7 @@ grammar = "html"
 [[language]]
 name = "typst"
 scope = "source.typst"
-injection-regex = "typst"
+injection-regex = "typ(st)?"
 file-types = ["typst", "typ"]
 comment-token = "//"
 language-servers = ["tinymist", "typst-lsp"]