fixing auto pretty only on json files

This commit is contained in:
Nikolajus 2016-07-15 21:00:38 +02:00
parent 7b7ca7b4c1
commit d27edae3c0
1 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ class PrettyJsonLintListener(sublime_plugin.EventListener, PrettyJsonBaseCommand
class PrettyJsonAutoPrettyOnSaveListener(sublime_plugin.EventListener): class PrettyJsonAutoPrettyOnSaveListener(sublime_plugin.EventListener):
def on_pre_save(self, edit): def on_pre_save(self, view):
auto_pretty = s.get("pretty_on_save", False) auto_pretty = s.get("pretty_on_save", False)
if auto_pretty: if auto_pretty and "JSON" in view.settings().get('syntax'):
sublime.active_window().run_command('pretty_json') sublime.active_window().run_command('pretty_json')