-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Adds preferences that map extensions and filenames to languages. #7588
Conversation
This adds `language.fileExtensions` and `language.fileNames` preferences that can set the language associated with the provided extensions or filenames. These prefs are both objects.
hey @busykai, Raymond agreed to look at this but if you have time you might want to take a look since there may be a connection with your language selector. |
// Constants | ||
|
||
var EXTENSION_MAP_PREF = "language.fileExtensions", | ||
NAME_MAP_PREF = "language.fileNames"; |
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'd suggest that these two should be used both in _prefState above and in the unit tests (exported with a dangling _).
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.
done
@dangoor done with the review. |
Review comments addressed. Ready for re-review @busykai (I did not do anything about the circular dependency. I figured that can be handled separately) |
}); | ||
|
||
// Private for unit tests | ||
exports._EXTENSION_MAP_PREF = _EXTENSION_MAP_PREF; |
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.
Nit: making indent of "=" at the same level as public exports will probably make it more readable.
Looks good! Just one minor nit comment which I'm not even sure is a worthy one. |
@busykai great. I'll fix the nit and merge. Thanks! |
This adds
language.fileExtensions
andlanguage.fileNames
preferencesthat can set the language associated with the provided extensions or
filenames. These prefs are both objects.
This is a fix for #6831