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

🐞 file type isn't identified correctly. Changed manually but it gets reset when closed #1148

Closed
avnerbarr opened this issue Mar 12, 2023 · 3 comments · Fixed by #1334
Closed
Labels
bug Something isn't working

Comments

@avnerbarr
Copy link

Description

js file is identified as a swift file

image

To Reproduce

create a js file

open right side tab and inspect file type. shows as swift rather than js file

Expected Behavior

should be identified by file extension

Version Information

CodeEdit: [e.g. 0.0.x-alpha.y]
macOS: [e.g. 13.2.1]
Xcode: [e.g. 14.2]

Additional Context

No response

Screenshots

No response

@avnerbarr avnerbarr added the bug Something isn't working label Mar 12, 2023
@avnerbarr
Copy link
Author

I can try to handle this If you could assign to me

@austincondiff austincondiff moved this from 🆕 New to 🏃‍♂️ In Progress in CodeEdit Project Mar 12, 2023
@iggy890
Copy link
Contributor

iggy890 commented Mar 17, 2023

Related to: #1014

iggy890 added a commit to iggy890/CodeEdit that referenced this issue Mar 18, 2023
@iggy890 iggy890 mentioned this issue Mar 18, 2023
8 tasks
@lukepistrol lukepistrol changed the title file type isn't identified correctly. Changed manually but it gets reset when closed 🐞 file type isn't identified correctly. Changed manually but it gets reset when closed Mar 23, 2023
@lukepistrol
Copy link
Member

One thing we might to consider for this: We currently also detect the filetype for syntax highlighting in CodeEditLanguages. This - for now - just uses the file's extension to determine which language it is but I think it would be nice to add additional mechanisms like first line regex or content regex for cases where there are multiple languages using the same file extension.

We could then just have CodeEditLanguages propagate the file type to this view and relay a manual override back to CodeEditLanguages in order to update the highlighting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🏁 Complete
Development

Successfully merging a pull request may close this issue.

3 participants