Updated the code to make sure it supports newer versions of Beau.
This commit is contained in:
parent
e47c52c998
commit
8b18de7d89
7
beau.py
7
beau.py
|
|
@ -41,7 +41,7 @@ class BeauCommand(sublime_plugin.TextCommand):
|
||||||
return
|
return
|
||||||
|
|
||||||
self.inThread(
|
self.inThread(
|
||||||
[self.path, '-c', active_view.file_name(), 'list', '--no-format'],
|
[self.path, 'list', '-c', active_view.file_name(), '--no-format'],
|
||||||
self.listFetched
|
self.listFetched
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -96,11 +96,14 @@ class BeauCommand(sublime_plugin.TextCommand):
|
||||||
results_view.set_syntax_file(SYNTAX)
|
results_view.set_syntax_file(SYNTAX)
|
||||||
|
|
||||||
self.inThread(
|
self.inThread(
|
||||||
[self.path, '-c', active_view.file_name(), 'request', alias, '--no-format'],
|
[self.path, 'request', alias,'-c', active_view.file_name(), '--no-format'],
|
||||||
onComplete=handleResult
|
onComplete=handleResult
|
||||||
)
|
)
|
||||||
|
|
||||||
def autoindent(self, obj):
|
def autoindent(self, obj):
|
||||||
|
if not obj.strip():
|
||||||
|
return 'Empty';
|
||||||
|
|
||||||
parsed = json.loads(obj)
|
parsed = json.loads(obj)
|
||||||
return json.dumps(
|
return json.dumps(
|
||||||
parsed,
|
parsed,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue