sublimetext-codeformatter
sublimetext-codeformatter copied to clipboard
Getting `TypeError: argument of type 'NoneType' is not iterable`
Just installed this plugin and got this when tried to format .js file:
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 618, in run_
return self.run(edit)
File "/Users/Admin/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/CodeFormatter.py", line 79, in run
formatter = Formatter(self.view, file_name, syntax, saving)
File "/Users/Admin/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/formatter.py", line 59, in __init__
if ("syntaxes" in opts and opts["syntaxes"]):
TypeError: argument of type 'NoneType' is not iterable
OS X, Sublime Text 3117
The same in Manjaro Linux
It seems lack of user setting file. Try to touch or create the User Setting for CodeFormatter.
Preferences > Package Settings > CodeFormatter > Settings - User
It might help.
as @tuha305 mentioned, create User Settings, cut and paste the default config over fixed the problem for me
Copying codeformatter_js_options from default to user settings didn't fix this issue for me.
As mentioned in #208, restarting Sublime Text solved this issue for me.