Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
hellboy81
@hellboy81
How can I format JSON content with plugin?
I have installed -> Right Click -> local menu -> Beautify editor content -> nothing
Is there working plugin with the same functionality as in Webstorm
?
ctz
@Chotaz
$ sudo su - root                                                                                 
# apm install atom-beautify
Installing atom-beautify to /root/.atom/packages ✓
# su user
$ apm install atom-beautify
Installing atom-beautify to /home/user/.atom/packages ✗

npm ERR! tar.unpack error reading /tmp/d-115516-20542-3rae44/package.tgz
npm ERR! addLocal Could not install /tmp/d-115516-20542-3rae44/package.tgz
npm ERR! Linux 3.19.0-20-generic
npm ERR! argv "/usr/local/share/atom/resources/app/apm/bin/node" "/usr/local/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/user/.atom/.apm/.apmrc" "--userconfig" "/home/user/.atom/.apmrc" "install" "/tmp/d-115516-20542-3rae44/package.tgz" "--target=0.22.0" "--arch=x64"
npm ERR! node v0.10.35
npm ERR! npm  v2.5.1

npm ERR! 0-byte tarball
npm ERR! Please run `npm cache clean`
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /tmp/apm-install-dir-115516-20542-15ol5i4/npm-debug.log

$ apm -v
apm  0.163.0
npm  2.5.1
node 0.10.35
python 2.7.9
git 2.4.3
Just posting this for reference and historical value.
User root installs the package with no problem, however I can't seem to do so with my user, I'll dig more into user-side problems with NPM while I try to figure this out, will update with new findings.
Aaron Ballard
@ansballard
@hellboy81 did you set the language of the file to JSON? Is it giving you an error?
Austin Cheney
@prettydiff
After two weeks of silent effort I am making strong progress on many of the open issues assigned to me: prettydiff/prettydiff#103
ctz
@Chotaz
Just a quick update on my not so unusual problem. Apparently while I was updating atom-beautify yesterday my connection dropped and I never even realized it, leading to one of it's dependencies getting a corrupted tarball and apparently apm/npm upon detecting such won't retry to download the file, just exit with an error and report the empty tarball rather vaguely. I had to manually delete the cross-spawn dependency folder to restor normal install/upgrade behaviour.
hellboy81
@hellboy81

How can I change JSON formatting rules to

"hosts" : {
       "DEV": [
           {"devHost01": "https://..."},           
           {"devHost02": "http://..."}
       ],
       "LIVE": [
          ....
        ]
}

?

hellboy81
@hellboy81
Currently it formats as follows:
"DEV": [{
}],
"LIVE": [{
....
}]
Aaron Ballard
@ansballard
@Chotaz good to hear you figured it out. Did npm cache clean not delete that folder for you? May be worth posting an issue on npm to see if that error is getting shown incorrectly.
@hellboy81 I didn't see config options in the package settings, but it uses JS Beautify by default, so I would assume you can put a .jsbeautifyrc in your path with the options you want to set.
Pubudu Kodikara
@THPubs
@Glavin001 Hi, @prettydiff have fixed a problem I reported. In his site the problem is fixed and he have released a fix to the code. But when using atom beautify the problem is still there. I re-installed atom beautify, re-installed atom but still no help :-(
Austin Cheney
@prettydiff
@hellboy81 Try putting that input into http://prettydiff.com/?mode=beautify but be sure it wrap it with a "{" and a "}". If this output is closer to what you want then I would recommend using prettydiff over the default jsbeautify. Atom-beautify includes both prettydiff and jsbeautify and you can which beautifier you would like to use
kevin sproles
@kevinsproles
can't seem to get beautify to trigger on file save.
works fine when manually triggering it.
Glavin Wiechert
@Glavin001
For which language, @kevinsproles ?
kevin sproles
@kevinsproles
@Glavin001 HTML
kevin sproles
@kevinsproles
@Glavin001 SCSS as well
WEIDA KONG
@iadaking

Installing “atom-beautify@0.28.7” failed.Hide output…

spawn-sync@1.0.11 postinstall C:\Users\ADMINI~1\AppData\Local\Temp\apm-install-dir-11567-12976-7d72bu\node_modules\atom-beautify\node_modules\cross-spawn\node_modules\spawn-sync
node postinstall

npm

don't understand why
gh0stl4b
@gh0stl4b
Same here, it just hangs the process and that is it...
Glavin Wiechert
@Glavin001
Cross-spawn has been updated. Please try installing again. Thanks
Juan M Garcia
@kelvix
and pretty sure I'm officially stuck, something about the tree view having a directory on Linux causes the atom ui to "flash" when a beautify on save occurs sigh
Juan M Garcia
@kelvix
but if i fork it, clone it, and apm link --dev try to figure out why it doesn't work it works...
h3x3d
@h3x3d
Hello guys. I'm having trouble with configuring atom-beautify. It always indents with tabs, not with spaces, configured in jsbeautifyrc in project root, or even in plugin configuration directly
h3x3d
@h3x3d
so, i found the problem. If u have jsbeautifyrc file in ur home directory - it will use it unless there is a jsbeautifyrc near the current file. I think that project-wide settings must override global user settings
Austin Cheney
@prettydiff
@h3x3d I disagree. You can always overwrite a global config with a local config. When that no longer becomes true you can never overwrite a global config, which is bad because a global config will always be more generic and distant from the needs of local work.
@Glavin001 I have started off a wiki on Github. I have seen some really good info recently that can be applied to multiple users.
Glavin Wiechert
@Glavin001
Great thanks !
Michael Stramel
@stramel
Hey @Glavin001, I love this plugin and use it all the time. However, the update time takes forever for some reason. Is this normal? Also, this made me start thinking about the codebase, it is one single plugin for all these different language beautifiers. Would it make sense to structure it more like linter, where you have a main beautifier plugin that defines the API for each language beautifier to interface with and allows developers to install only beautifiers that they will use?
Glavin Wiechert
@Glavin001
Glavin001/atom-beautify#320
@stramel I'd recommend that issue, #320
Michael Stramel
@stramel
@Glavin001 Thanks, exactly what I was looking for
Glavin Wiechert
@Glavin001
Great
I would really appreciate feedback and any new ideas on this matter
The disadvantage with lazy loading the beautified dependencies being that it would need to be loaded when the beautified is used, so the first time the user uses the beautified after an update it will not immediately work.
Michael Stramel
@stramel
Hmm, how does linter get around it?
Glavin Wiechert
@Glavin001
Each linter are separate packages
So you must install linter, and linter-language etc
Michael Stramel
@stramel
oh, that's not what you meant by lazy loading?
nevermind
I think I like the approach linter took with separate packages
For instance, I never really use any beautifier other than a handful. So for me it is definitely beneficial to only load those handfuls. It would also make updates shorter since each package is small and managed separately
Glavin Wiechert
@Glavin001
I want Atom Beautify to be the one-stop place for all code beautification in Atom. As of #282, each beautifier is very light-weight itself (e.g. https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/autopep8.coffee ) and it'd be annoying for me to maintain at least (currently) 15 small repos for each beautifier, when right now they are simply files. So I am not supportive of splitting into separate modules, as the linter package does.
Essentially, I picture it as Atom Beautify being able to recognize each language it supports and then effectively install each module upon usage. Like linter package, except auto-installing: you do not need to install linter and then linter-coffeescript, you simply install linter and try to lint CoffeeScript and it will detect that it is supported and install it for you.
Please leave your feedback on the Issue #320 :).
Austin Cheney
@prettydiff
I have been looking at this over the last two weeks. I am going to publish an update today that radically changes the architecture of Pretty Diff, and so I also plan to reduce the size of the npm package. The current package as of v1.13.8 is 8480kb. With my code changes that I am about to launch I anticipate the package will become about 2mb.
Glavin Wiechert
@Glavin001
great!!
Austin Cheney
@prettydiff
I am debating on whether I want to do the extra work to minify everything and reduce the weight to about 1.2mb