| Summary: | Kdevelop misinterprets typescript files | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | amixra <amitmishra0617> |
| Component: | general | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | CC: | igorkuo, pprkut |
| Priority: | NOR | ||
| Version First Reported In: | 5.8.220402 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
screenshot of trying to open typescript file
Screenshot of the bottom part of KDevelop Kdevelop bottom |
||
|
Description
amixra
2022-07-12 14:00:32 UTC
Cannot reproduce. How does Kate or KWrite open these files? In the bottom left corner of KDevelop, Kate and KWrite there is a mode selection button. What mode is selected for your typescript files by default? Does it work correctly when you set TypeScript mode manually? (In reply to Igor Kushnir from comment #1) > How does Kate or KWrite open these files? They open it as they should as a text editor. Completely normal and expected behaviour. > In the bottom > left corner of KDevelop, Kate and KWrite there is a mode selection button. I do have mode selection in Kate and KWrite in the bottom right corner but there is nothing like that in kdevelop. [Screenshot](https://pasteboard.co/08da8U1w5rOn.png) To confirm whether we both are talking about the same thing, the following screenshot is from kate which works as expected. [Kate](https://pasteboard.co/r7ZoOFm14L7N.png) I think the mime type detection causes this. *.ts is a valid extension for video/mp2t, MPEG-2 Transport Stream, which is why kdevelop would load a kpart to try to play a video. Created attachment 150582 [details]
Screenshot of the bottom part of KDevelop
(In reply to amixra from comment #2) > I do have mode selection in Kate and KWrite in the bottom right corner but > there is nothing like that in kdevelop. > [Screenshot](https://pasteboard.co/08da8U1w5rOn.png) Attached a screenshot where this bottom bar is present in KDevelop As you haven't been using KDevelop for a long time, maybe some old config files break the UI and file mode detection on your side? Assuming you don't have any valuable configuration there (if you do, create a backup), try removing ~/.config/kdeveloprc, ~/.local/share/kdevelop. What does `kmimetypefinder5 foobar.ts` say for you? I indeed get `video/mpeg` back. You probably need to solve that via `File Associations` in `system-settings`, there you can screate a new text/x-typescript mimetype, that should hopefully fix it then. Or remove the .ts pattern from the other mime types. Generally though this is not something we can handle within kdevelop easily. Created attachment 150607 [details]
Kdevelop bottom
After deleting both files, UI did change a bit. Updated and again deleted both files but the bottom part doesn't have any bar like that as in your screenshot.
(In reply to Milian Wolff from comment #6) > What does `kmimetypefinder5 foobar.ts` say for you? I indeed get > `video/mpeg` back. Same here. > You probably need to solve that via `File Associations` > in `system-settings`, there you can screate a new text/x-typescript > mimetype, that should hopefully fix it then. Or remove the .ts pattern from > the other mime types. This allows opening *.ts files now after one [popup] (https://pasteboard.co/CH9RSk49CVNj.png) > Generally though this is not something we can handle within kdevelop easily. I wonder why I never faced this with other editors if *.ts was always there as video/mpeg type. (In reply to amixra from comment #8) > This allows opening *.ts files now after one [popup] Oh that was because I had added it into application group following the convention of javascript. There isn't any popup after adding into text group. (In reply to amixra from comment #7) > Created attachment 150607 [details] > Kdevelop bottom > > After deleting both files, UI did change a bit. Updated and again deleted > both files but the bottom part doesn't have any bar like that as in your > screenshot. Ah, right. The mode selection button is part of the text editor view. So it only appears when a file is opened in KDevelop's text editor. By the way, "Cannot reproduce" in my earlier comment means that I tried opening several *.ts files and they were correctly recognized and opened as TypeScript by KDevelop on my system (Manjaro Xfce). Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! |