This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Avoid searching binary files; tweaks to language mappings; APIs to unregister file extension mapping #7290
Merged
Merged
Avoid searching binary files; tweaks to language mappings; APIs to unregister file extension mapping #7290
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
247d711
A few small tweaks to language mappings:
peterflynn 78ac6ea
- Ability to remove file extension/name mappings from existing Language
peterflynn e9ad8a0
Code review: change Language add/remove extension & filename APIs to …
peterflynn e013ca4
Add some more common binary types: Node native extensions, Flash, EOT
peterflynn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Will this break extensions like mine that creates a custom viewer for fonts since now some of the extensions are in this unused language? https://github.com/TomMalbran/brackets-fonts-viewer
My extension defines a font language, and uses it to register a custom font viewer. We could have other extensions doing the same for pdf, zip files and others.
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.
Yes, good point - so we should hold off on merging this part until #6873 is implemented
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.
Or we could at least split them and give them better languages and not put them all in the same bag. But we could still run into the same issue.
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.
We should think about grouping them a bit more in order to make some more custom viewers available. Maybe think of these:
And why don't we add
.tiff
or such to the image group? The image viewer should still work, so there are no problems, are they?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 don`t think that we need separate languages, I would just put them all together. A custom viewer extension can just remove the file extensions from this list and create the language. Also, we can't even open audio or video files in Brackets, so doesn't make sense to make languages that we are not using.
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.
Yeah, I think if we're not doing any special handling of them we should just lump them all together for now. As @TomMalbran says, if an extension wants to provide support for a bunch of font type, or video, or whatnot, it can register a new language and take over those file extensions itself.
I'm not sure why we even break out audio separately -- but just in case extensions are relying on it, I'd like to leave it as-is for now.
@SAplayer The reason .tiff isn't listed under images is because Brackets doesn't support it -- our image-preview UI can't render it, and it's not a format used when coding CSS/HTML (for the same reason).
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.
Since we can break extensions that use any of the new file extensions added here, we could just also break extensions that use the audio language. I don't think that there should be any with it since you can't do much with it. Can you check that?