Fixing issue #21 moving loading of configuration to async callback function plugin_loaded
This commit is contained in:
parent
4282802b65
commit
a101fa0f12
|
@ -41,3 +41,8 @@ class PrettyjsonCommand(sublime_plugin.TextCommand):
|
||||||
import sys
|
import sys
|
||||||
exc = sys.exc_info()[1]
|
exc = sys.exc_info()[1]
|
||||||
sublime.status_message(str(exc))
|
sublime.status_message(str(exc))
|
||||||
|
|
||||||
|
|
||||||
|
def plugin_loaded():
|
||||||
|
global s
|
||||||
|
s = sublime.load_settings("Pretty JSON.sublime-settings")
|
|
@ -1,5 +1,12 @@
|
||||||
import simplejson as json
|
try:
|
||||||
from simplejson import OrderedDict
|
# python 3 / Sublime Text 3
|
||||||
|
from . import simplejson as json
|
||||||
|
from .simplejson import OrderedDict
|
||||||
|
except (ValueError):
|
||||||
|
# python 2 / Sublime Text 2
|
||||||
|
import simplejson as json
|
||||||
|
from simplejson import OrderedDict
|
||||||
|
|
||||||
import decimal
|
import decimal
|
||||||
import unittest
|
import unittest
|
||||||
|
|
Loading…
Reference in New Issue