Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Improve TypeScript shebang detection (#31437)

Umesh Yadav32214abb64c7
diff --git a/crates/languages/src/typescript/config.toml b/crates/languages/src/typescript/config.toml
index aca294df85d..27ad1a9e943 100644
--- a/crates/languages/src/typescript/config.toml
+++ b/crates/languages/src/typescript/config.toml
@@ -1,7 +1,7 @@
name = "TypeScript"
grammar = "typescript"
path_suffixes = ["ts", "cts", "mts"]
-first_line_pattern = '^#!.*\b(?:deno run|ts-node|bun|tsx)\b'
+first_line_pattern = '^#!.*\b(?:deno run|ts-node|bun|tsx|[/ ]node)\b'
line_comments = ["// "]
block_comment = ["/*", "*/"]
autoclose_before = ";:.,=}])>"