Open ewen-lbh opened 2 months ago
Hey, thanks for filling out this issue. For what it's worth, we always treat files with node shebang as JS files; see: https://github.com/zed-industries/zed/blob/main/crates/languages/src/javascript/config.toml#L4 I wonder if it's as easy as adding the same detection in TS config.toml (that currently doesn't specify any shebang: https://github.com/zed-industries/zed/blob/main/crates/languages/src/typescript/config.toml).
I came here to report this same issue. Is there anything I can do to help move this forward?
Ran into this again. The workaround is to manually switch to TypeScript (by clicking the language selector down in the bottom right corner) and then restarting the language server.
Check for existing issues
Describe the bug / provide steps to reproduce it
I'm building a CLI with Typescript, but the resulting transpiled JS files will have to be executed by Node.
Shebang language detection is a feature (as per https://github.com/zed-industries/zed/issues/6089), but in that case it leaves me with plenty of linter errors and no autocompletion '^^
I'd argue that special-casing
.ts
file that have a javascript-matching shebang as typescript files would be the solutionEnvironment
Zed: v0.142.6 (Zed) OS: Linux Wayland endeavouros unknown Memory: 15.6 GiB Architecture: x86_64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your Zed.log file to this issue.
No response