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`
This commit is contained in:
parent
3a03109a99
commit
80e0e98e45
1 changed files with 4 additions and 4 deletions
|
@ -223,7 +223,7 @@ mode = "location"
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "rust"
|
name = "rust"
|
||||||
scope = "source.rust"
|
scope = "source.rust"
|
||||||
injection-regex = "rust"
|
injection-regex = "rs|rust"
|
||||||
file-types = ["rs"]
|
file-types = ["rs"]
|
||||||
roots = ["Cargo.toml", "Cargo.lock"]
|
roots = ["Cargo.toml", "Cargo.lock"]
|
||||||
shebangs = ["rust-script", "cargo"]
|
shebangs = ["rust-script", "cargo"]
|
||||||
|
@ -824,7 +824,7 @@ source = { git = "https://github.com/tree-sitter/tree-sitter-html", rev = "29f53
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "python"
|
name = "python"
|
||||||
scope = "source.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" }]
|
file-types = ["py", "pyi", "py3", "pyw", "ptl", "rpy", "cpy", "ipy", "pyt", { glob = ".python_history" }, { glob = ".pythonstartup" }, { glob = ".pythonrc" }, { glob = "SConstruct" }, { glob = "SConscript" }]
|
||||||
shebangs = ["python"]
|
shebangs = ["python"]
|
||||||
roots = ["pyproject.toml", "setup.py", "poetry.lock", "pyrightconfig.json"]
|
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]]
|
[[language]]
|
||||||
name = "haskell"
|
name = "haskell"
|
||||||
scope = "source.haskell"
|
scope = "source.haskell"
|
||||||
injection-regex = "haskell"
|
injection-regex = "hs|haskell"
|
||||||
file-types = ["hs", "hs-boot"]
|
file-types = ["hs", "hs-boot"]
|
||||||
roots = ["Setup.hs", "stack.yaml", "cabal.project"]
|
roots = ["Setup.hs", "stack.yaml", "cabal.project"]
|
||||||
comment-token = "--"
|
comment-token = "--"
|
||||||
|
@ -3155,7 +3155,7 @@ grammar = "html"
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "typst"
|
name = "typst"
|
||||||
scope = "source.typst"
|
scope = "source.typst"
|
||||||
injection-regex = "typst"
|
injection-regex = "typ(st)?"
|
||||||
file-types = ["typst", "typ"]
|
file-types = ["typst", "typ"]
|
||||||
comment-token = "//"
|
comment-token = "//"
|
||||||
language-servers = ["tinymist", "typst-lsp"]
|
language-servers = ["tinymist", "typst-lsp"]
|
||||||
|
|
Loading…
Add table
Reference in a new issue