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

recognize more files and shebangs #10120

Merged
merged 6 commits into from
Apr 5, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ name = "javascript"
scope = "source.js"
injection-regex = "(js|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"]
comment-token = "//"
block-comment-tokens = { start = "/*", end = "*/" }
Expand Down Expand Up @@ -708,9 +708,11 @@ grammar = "javascript"
name = "typescript"
scope = "source.ts"
injection-regex = "(ts|typescript)"
file-types = ["ts", "mts", "cts"]
language-id = "typescript"
shebangs = ["deno", "ts-node"]
file-types = ["ts", "mts", "cts"]#, { glob = ".deno_repl_history" }, { glob = ".bun_repl_history" }]
# Deno doesn't save hist-file by default: https://deno.land/x/[email protected]/tools/repl.md?source=#deno_repl_history
# Bun doesn't (yet) have a standard REPL history file (this info wasn't verified)
Rudxain marked this conversation as resolved.
Show resolved Hide resolved
shebangs = ["deno", "bun", "ts-node"]
comment-token = "//"
block-comment-tokens = { start = "/*", end = "*/" }
language-servers = [ "typescript-language-server" ]
Expand Down Expand Up @@ -781,8 +783,8 @@ source = { git = "https://github.com/tree-sitter/tree-sitter-html", rev = "29f53
name = "python"
scope = "source.python"
injection-regex = "python"
file-types = ["py", "pyi", "py3", "pyw", "ptl", "rpy", "cpy", "ipy", "pyt", { glob = ".pythonstartup" }, { glob = ".pythonrc" }, { glob = "SConstruct" }, { glob = "SConscript" }]
shebangs = ["python"]
file-types = ["py", "pyi", "py3", "pyw", "ptl", "rpy", "cpy", "ipy", "pyt", { glob = ".python_history" }, { glob = ".pythonstartup" }, { glob = ".pythonrc" }, { glob = "SConstruct" }, { glob = "SConscript" }]
shebangs = ["python", "python3"]
Rudxain marked this conversation as resolved.
Show resolved Hide resolved
roots = ["pyproject.toml", "setup.py", "poetry.lock", "pyrightconfig.json"]
comment-token = "#"
language-servers = [ "pylsp" ]
Expand Down Expand Up @@ -883,6 +885,10 @@ injection-regex = "(shell|bash|zsh|sh)"
file-types = [
"sh",
"bash",
"ash",
Rudxain marked this conversation as resolved.
Show resolved Hide resolved
"dash",
"ksh",
"mksh",
"zsh",
"zshenv",
"zlogin",
Expand All @@ -894,7 +900,6 @@ file-types = [
"bazelrc",
"Renviron",
"zsh-theme",
"ksh",
"cshrc",
"tcshrc",
"bashrc_Apple_Terminal",
Expand Down