try .jsbeautifierrc and update docs
This commit is contained in:
parent
0bc284a7fd
commit
f43b4eb7eb
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"indent_size": 2,
|
||||
"indent_char": " ",
|
||||
"indent_level": 0,
|
||||
"indent_with_tabs": false,
|
||||
"preserve_newlines": true,
|
||||
"max_preserve_newlines": 2
|
||||
}
|
|
@ -1,3 +1,8 @@
|
|||
# v0.2.3 (2014-05-13)
|
||||
|
||||
- support `.jsbeautifierrc` (thanks @karolyi)
|
||||
- fixed: reload on save (thanks @karolyi)
|
||||
|
||||
# v0.2.2 (2014-03-18)
|
||||
|
||||
- added experimental support for XML (thanks @mtanzi)
|
||||
|
|
|
@ -136,7 +136,7 @@ function beautify() {
|
|||
}
|
||||
|
||||
function handleSafeEvent() {
|
||||
atom.workspace.eachEditor(function (editor) {
|
||||
atom.workspace.eachEditor(function(editor) {
|
||||
var buffer = editor.getBuffer();
|
||||
plugin.unsubscribe(buffer);
|
||||
|
||||
|
@ -151,9 +151,10 @@ plugin.configDefaults = {
|
|||
beautifyOnSave: false
|
||||
};
|
||||
|
||||
plugin.activate = function () {
|
||||
plugin.activate = function() {
|
||||
handleSafeEvent();
|
||||
plugin.subscribe(atom.config.observe('atom-beautify.beautifyOnSave',
|
||||
plugin.subscribe(atom.config.observe(
|
||||
'atom-beautify.beautifyOnSave',
|
||||
handleSafeEvent));
|
||||
return atom.workspaceView.command('beautify', beautify);
|
||||
};
|
Loading…
Reference in New Issue