-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
feat: more file types available in file editor (#975) #973 #975
Conversation
created a pull request, adding more cases in. |
As far as I know, if it's a supported file type, it should open it. (Now that I'm thinking about it I'm going to add As for files without any extension, it doesn't open them. I suppose there could be a check somewhere that determines if the file has no extension, but I'm not sure where and why you'd need to edit them. I'm also not sure why the linux build failed here. |
it looks like it failed because it could not update/install dependencies, there are a few, mirror not found errors |
Don't worry about the linux builds, it's an external issue, i'll look into it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we may want to use mime-types, or an NPM library with file extensions, instead of managing dozens of file extensions ourselves. Could you look into this?
Some pointers:
I've fixed CI builds, by the way, you can rebase your PR to get green checkmarks ✔️ |
Gotcha. I’ll look into this. |
Alright, now it's using MIME types to check the filetype. Only problem is now it opens binary files as well (files like Windows Desktop Shortcuts and DLLs), but for now at least it opens any registered file type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've pushed some changes to leverage mime.charset()
as a way to tell which files are text-editable. Tell me what you think, this is mergeable for me.
Looks good to me! Think we're ready here. |
@Animus-Surge @wrac4242 thanks for helping out! |
…uared#973 Co-authored-by: Gabriel Saillard <gabriel@saillard.dev>
Small update to the file editor I pushed a while ago, adding python and a few other extensions to the list of file types that are able to be opened by eDEX