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

TSX files not showing correctly on Windows, on the bottom bar it says "Unknown" on the language type #13110

Open
1 task done
Falling12 opened this issue Jun 16, 2024 · 5 comments
Labels
defect [core label] editor Feedback for code editing, formatting, editor iterations, etc language An umbrella label for all programming languages syntax behaviors open source Open source community projects, contributions, etc tsx TypeScript JSX support typescript TypeScript programming language support windows

Comments

@Falling12
Copy link

Falling12 commented Jun 16, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

When I open a .tsx file the highlights don't show up, and in the bottom it says Unknown language.
Edit: Its also happenning with .ts files, if I add the tsx file in the settings to file_types

Environment

Zed: v0.141.0 (Zed Dev 15d3e54)
OS: Windows 10.0.22631
Memory: 23.9 GiB
Architecture: x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

image

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

2024-06-16T16:51:33+02:00 [INFO] Took 9.2899ms to receive response to "notifyRejected" id 25
2024-06-16T16:51:33+02:00 [INFO] Took 18.0356ms to receive response to "getCompletions" id 26
2024-06-16T16:51:33+02:00 [ERROR] failed to load language TSX:
Error loading brackets query

Caused by:
Query error at 1:1. Invalid syntax:
../typescript/brackets.scm
^
2024-06-16T16:51:33+02:00 [INFO] Took 3.4581ms to receive response to "notifyRejected" id 27
2024-06-16T16:51:33+02:00 [INFO] Took 4.6366ms to receive response to "notifyRejected" id 28
2024-06-16T16:51:37+02:00 [ERROR] crates\assistant\src\assistant_panel.rs:954: Az elem nem található. (0x80070490)
2024-06-16T16:51:37+02:00 [ERROR] crates\assistant\src\assistant_panel.rs:954: Az elem nem található. (0x80070490)
2024-06-16T16:51:39+02:00 [INFO] Took 4.1897ms to receive response to "notifyRejected" id 29
2024-06-16T16:51:39+02:00 [INFO] Took 4.0737ms to receive response to "notifyRejected" id 30
2024-06-16T16:51:48+02:00 [INFO] Took 5.1133ms to receive response to "notifyRejected" id 31
2024-06-16T16:51:48+02:00 [INFO] Took 3.5609ms to receive response to "notifyRejected" id 32
2024-06-16T16:52:01+02:00 [ERROR] crates\gpui\src\elements\img.rs:345: BadStatus { status: 404, body: "Not Found" }
2024-06-16T16:52:01+02:00 [ERROR] crates\gpui\src\elements\img.rs:345: BadStatus { status: 404, body: "Not Found" }
2024-06-16T16:52:01+02:00 [ERROR] crates\gpui\src\elements\img.rs:345: BadStatus { status: 404, body: "Not Found" }
2024-06-16T16:52:01+02:00 [ERROR] crates\gpui\src\elements\img.rs:345: BadStatus { status: 404, body: "Not Found" }
2024-06-16T16:52:01+02:00 [ERROR] crates\gpui\src\elements\img.rs:345: BadStatus { status: 404, body: "Not Found" }
2024-06-16T16:52:01+02:00 [ERROR] crates\gpui\src\elements\img.rs:345: BadStatus { status: 404, body: "Not Found" }
2024-06-16T16:52:01+02:00 [ERROR] crates\gpui\src\elements\img.rs:345: BadStatus { status: 404, body: "Not Found" }
2024-06-16T16:52:01+02:00 [ERROR] crates\gpui\src\elements\img.rs:345: BadStatus { status: 404, body: "Not Found" }
2024-06-16T16:52:01+02:00 [ERROR] crates\gpui\src\elements\img.rs:345: BadStatus { status: 404, body: "Not Found" }
2024-06-16T16:52:01+02:00 [ERROR] crates\gpui\src\elements\img.rs:345: BadStatus { status: 404, body: "Not Found" }

@Falling12 Falling12 added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels Jun 16, 2024
@Moshyfawn Moshyfawn added editor Feedback for code editing, formatting, editor iterations, etc windows typescript TypeScript programming language support language An umbrella label for all programming languages syntax behaviors tsx TypeScript JSX support open source Open source community projects, contributions, etc and removed triage Maintainer needs to classify the issue labels Jun 16, 2024
@Jh123x
Copy link

Jh123x commented Jun 17, 2024

image
Same here

@notpeter notpeter removed the admin read Pending admin review label Jun 17, 2024
@Ianec21
Copy link

Ianec21 commented Jun 19, 2024

Same issue here, can't get it to work sadly.

@Ianec21
Copy link

Ianec21 commented Jun 19, 2024

UPDATE! I've managed to solve it. It seems that the error was coming from crates/languages/src/tsx/brackets.csm. The problem was the import of some files from languages/typescript. I saw that tsx and typescript have 3 identical files in common which TSX is importing them from typescript folder. All I had to do is to copy the content from typescript/brackets.scm, typescript/indents.scm, typescript/outline.scm into tsx/brackets.scm, tsx/indents.scm, tsx/outline.scm and it works for me well.

@Falling12
Copy link
Author

Hmm, I will try this. Thank you for the tip. But I hope the team will also fix this in the future.

@Falling12
Copy link
Author

UPDATE! I've managed to solve it. It seems that the error was coming from crates/languages/src/tsx/brackets.csm. The problem was the import of some files from languages/typescript. I saw that tsx and typescript have 3 identical files in common which TSX is importing them from typescript folder. All I had to do is to copy the content from typescript/brackets.scm, typescript/indents.scm, typescript/outline.scm into tsx/brackets.scm, tsx/indents.scm, tsx/outline.scm and it works for me well.

Yea, this seems to solve this issue. Hope the team can also implement this. Thank you for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] editor Feedback for code editing, formatting, editor iterations, etc language An umbrella label for all programming languages syntax behaviors open source Open source community projects, contributions, etc tsx TypeScript JSX support typescript TypeScript programming language support windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants