mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 17:36:19 +04:00
recognize more files and shebangs (#10120)
* recognize `.node_repl_history` as JS * recognize `bun` shebang also add comments explaining Deno & Bun history files * recognize `.python_history` file and `python3` shebang * recognize more shells * rm Py3 shebang Co-authored-by: ath3 <45574139+ath3@users.noreply.github.com> * rm non-standard deno/bun hist recognition --------- Co-authored-by: ath3 <45574139+ath3@users.noreply.github.com>
This commit is contained in:
parent
a2ee2e66f2
commit
1ba5763a0c
@ -670,7 +670,7 @@ name = "javascript"
|
|||||||
scope = "source.js"
|
scope = "source.js"
|
||||||
injection-regex = "(js|javascript)"
|
injection-regex = "(js|javascript)"
|
||||||
language-id = "javascript"
|
language-id = "javascript"
|
||||||
file-types = ["js", "mjs", "cjs", "rules", "es6", "pac", { glob = "jakefile" }]
|
file-types = ["js", "mjs", "cjs", "rules", "es6", "pac", { glob = ".node_repl_history" }, { glob = "jakefile" }]
|
||||||
shebangs = ["node"]
|
shebangs = ["node"]
|
||||||
comment-token = "//"
|
comment-token = "//"
|
||||||
block-comment-tokens = { start = "/*", end = "*/" }
|
block-comment-tokens = { start = "/*", end = "*/" }
|
||||||
@ -709,9 +709,9 @@ grammar = "javascript"
|
|||||||
name = "typescript"
|
name = "typescript"
|
||||||
scope = "source.ts"
|
scope = "source.ts"
|
||||||
injection-regex = "(ts|typescript)"
|
injection-regex = "(ts|typescript)"
|
||||||
file-types = ["ts", "mts", "cts"]
|
|
||||||
language-id = "typescript"
|
language-id = "typescript"
|
||||||
shebangs = ["deno", "ts-node"]
|
file-types = ["ts", "mts", "cts"]
|
||||||
|
shebangs = ["deno", "bun", "ts-node"]
|
||||||
comment-token = "//"
|
comment-token = "//"
|
||||||
block-comment-tokens = { start = "/*", end = "*/" }
|
block-comment-tokens = { start = "/*", end = "*/" }
|
||||||
language-servers = [ "typescript-language-server" ]
|
language-servers = [ "typescript-language-server" ]
|
||||||
@ -782,7 +782,7 @@ source = { git = "https://github.com/tree-sitter/tree-sitter-html", rev = "29f53
|
|||||||
name = "python"
|
name = "python"
|
||||||
scope = "source.python"
|
scope = "source.python"
|
||||||
injection-regex = "python"
|
injection-regex = "python"
|
||||||
file-types = ["py", "pyi", "py3", "pyw", "ptl", "rpy", "cpy", "ipy", "pyt", { 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"]
|
||||||
comment-token = "#"
|
comment-token = "#"
|
||||||
@ -884,6 +884,10 @@ injection-regex = "(shell|bash|zsh|sh)"
|
|||||||
file-types = [
|
file-types = [
|
||||||
"sh",
|
"sh",
|
||||||
"bash",
|
"bash",
|
||||||
|
"ash",
|
||||||
|
"dash",
|
||||||
|
"ksh",
|
||||||
|
"mksh",
|
||||||
"zsh",
|
"zsh",
|
||||||
"zshenv",
|
"zshenv",
|
||||||
"zlogin",
|
"zlogin",
|
||||||
@ -895,7 +899,6 @@ file-types = [
|
|||||||
"bazelrc",
|
"bazelrc",
|
||||||
"Renviron",
|
"Renviron",
|
||||||
"zsh-theme",
|
"zsh-theme",
|
||||||
"ksh",
|
|
||||||
"cshrc",
|
"cshrc",
|
||||||
"tcshrc",
|
"tcshrc",
|
||||||
"bashrc_Apple_Terminal",
|
"bashrc_Apple_Terminal",
|
||||||
|
Loading…
Reference in New Issue
Block a user