Open magleahy opened 8 years ago
Try adding "syntaxes": "javascript"
to your "codeformatter_js_options"
settings if it isn't there.
I had this same issue. I had made a change to codeformatter_js_options
that I put in the user settings so it wouldn't overwrite when the package updated. When I added the syntaxes
line to the user settings it worked again. Is that intended behavior? I thought any line that I don't overwrite in my user settings would default to the package settings.
A working version of Package Settings
> Code Formatter
> Settings - User
:
{
"codeformatter_js_options":
{
"indent_size": 2, // indentation size
"syntaxes": "javascript,json",
"preserve_newlines": true
},
}
The problem is likely caused by the shallow merging strategy used to merge user settings with default settings, thus the resulting codeformatter_js_options.syntaxes
might be empty if not copied to user settings,
A possible solution could be moving codeformatter_js_options.syntaxes
out of codeformatter_js_options
object, e.g.:
{
codeformatter_syntaxes:
{
"codeformatter_js": "javascript,json",
"codeformatter_css": "css,less",
// ...
}
}
Or maybe just make sure the default values apply when not set in bogus user settings.
I can't seem to run CodeFormatter over JS file. I have Sublime Text 3 and installed CodeFormatter via Package Installer. HELP!