-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Map filename to language in case of dotfiles #11560
Conversation
All unit integration and extension tests are passing. |
For a file named "language.fileNames": {
"foobar": "c"
} Update: Made changes to all the locales available. |
4bdaaff
to
0d2e098
Compare
I meant what would happen for files without extensions? like just the filename |
@abose I am not sure if I understand your concern here. Files named |
got it! misunderstood the PR before. |
@abose No worries. The strings have been modified. |
could you add a unit test for this? |
@sprintr With this I'm able to specify a default language for a specific file, but not able to specify a default language for dotfiles or extensionless files. Also I'm new to Brackets and GitHub, so I apologize in advance for lacking knowledge. I want 'bash' to be the default language for .bash_profile and similar files. |
@meeksdoteric for your particular case #11558 should be fine, this one applies to all the extension-less files and dotfiles. |
Thanks!
|
This requires some unit tests, I still don't understand what it should do :) |
LanguageManager.getCompoundFileExtension
returns an empty string for dotfiles and extension-less files because of which the Language menu showsSet as Default for . Files
. Clicking which adds an empty string as an extension in"language.fileExtensions"
.This PR will add dotfiles and extension-less files to
"language.fileNames"
instead of"language.fileExtensions"
. The dot in extension is added dynamically now, will update it in rest of the locales once this gets reviewed.