janosimas / formatter-astyle Goto Github PK
View Code? Open in Web Editor NEWAtom package for formatting code with astyle
License: MIT License
Atom package for formatting code with astyle
License: MIT License
I have --indent-namepsace option set in my option file in my home folder, and I'm sure that it works if I use astyle directly. But when I use formatter-astyle, only the option of 'Indent namespace' in Settings page have effect, that is, the 'indent-namespace' option in option file is ignnored.
Specifying the option file's location in Settings page doesn't solve this problem. And I found that I must copy the option file to the project's root folder to make it have effect.
Is there any possiblilty that adding a feature that read astyle parameters from file before processing?
The location of parameter file can be configured in the package setting page.
Or more, the package can automactiacally search up from the directory tree for file, whose name is internnaly fixed or flexibly configured, if that file is found, use its content to pass to astyle.
Fails to activate plugin in Atom 1.10.x
[Enter steps to reproduce below:]
Atom Version: 1.11.2
Electron Version: 0.37.8
System: Mac OS X 10.12
Thrown From: formatter-astyle package, v1.0.0
Failed to activate the formatter-astyle package
At Arguments to CompositeDisposable.add must have a .dispose() method
TypeError: Arguments to CompositeDisposable.add must have a .dispose() method
at assertDisposable (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/composite-disposable.js:70:13)
at CompositeDisposable.module.exports.CompositeDisposable.add (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/composite-disposable.js:43:11)
at Module.consumeFormatter (/Users/shishuo/.atom/packages/formatter/lib/main.coffee:70:21)
at Provider.module.exports.Provider.provide (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/service-hub/lib/provider.js:29:52)
at ServiceHub.module.exports.ServiceHub.provide (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/service-hub/lib/service-hub.js:30:20)
at Package.module.exports.Package.activateServices (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:355:71)
at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:186:16)
at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:156:32
at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:92:15)
at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:149:26
at Package.module.exports.Package.activate (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:146:34)
at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:538:21)
at /Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:519:29
at Config.module.exports.Config.transactAsync (/Applications/Atom.app/Contents/Resources/app.asar/src/config.js:337:18)
at PackageManager.module.exports.PackageManager.activatePackages (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:514:19)
at PackageManager.module.exports.PackageManager.activate (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:497:46)
at /Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:779:28
{
"core": {
"automaticallyUpdate": false
},
"formatter-astyle": {
"CommmandLineOptions": {
"arguments": [
"-A1 -c -f -H -J -k3 -m1 -p -U -W3 -xC120 -xe -xy -Y -Z -z1 -xM -xQ -xP0 --suffix=.bak"
]
},
"PaddingOptions": {},
"TabOptions": {}
}
}
# User
atom-beautify, v0.29.13 (inactive)
formatter, v2.12.3 (inactive)
formatter-astyle, v1.0.0 (inactive)
hex, v0.6.2 (inactive)
json-schema, v0.1.15 (inactive)
linter, v1.11.18 (inactive)
linter-eslint, v8.0.0 (inactive)
linter-js-yaml, v1.2.5 (inactive)
linter-markdown, v3.0.2 (inactive)
minimap, v4.25.0 (inactive)
project-manager, v3.2.5 (inactive)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.44.0 (inactive)
base16-tomorrow-dark-theme, v1.2.0 (inactive)
base16-tomorrow-light-theme, v1.2.0 (inactive)
one-dark-ui, v1.6.0 (inactive)
one-light-ui, v1.6.0 (inactive)
one-dark-syntax, v1.3.0 (inactive)
one-light-syntax, v1.3.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.7.0 (inactive)
archive-view, v0.61.1 (inactive)
autocomplete-atom-api, v0.10.0 (inactive)
autocomplete-css, v0.11.2 (inactive)
autocomplete-html, v0.7.2 (inactive)
autocomplete-plus, v2.31.1 (inactive)
autocomplete-snippets, v1.11.0 (inactive)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (inactive)
background-tips, v0.26.1 (inactive)
bookmarks, v0.42.0 (inactive)
bracket-matcher, v0.82.1 (inactive)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (inactive)
dev-live-reload, v0.47.0 (inactive)
encoding-selector, v0.22.0 (inactive)
exception-reporting, v0.40.0 (inactive)
find-and-replace, v0.201.1 (inactive)
fuzzy-finder, v1.4.0 (inactive)
git-diff, v1.1.0 (inactive)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.2 (inactive)
image-view, v0.59.0 (inactive)
incompatible-packages, v0.26.1 (inactive)
keybinding-resolver, v0.35.0 (inactive)
line-ending-selector, v0.5.0 (inactive)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (inactive)
metrics, v1.0.0 (inactive)
notifications, v0.65.1 (inactive)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.242.2-hotfix1 (inactive)
snippets, v1.0.2 (inactive)
spell-check, v0.68.2 (inactive)
status-bar, v1.4.1 (inactive)
styleguide, v0.47.0 (inactive)
symbols-view, v0.113.1 (inactive)
tabs, v0.101.0 (inactive)
timecop, v0.33.2 (inactive)
tree-view, v0.209.3 (inactive)
update-package-dependencies, v0.10.0 (inactive)
welcome, v0.35.1 (inactive)
whitespace, v0.33.0 (inactive)
wrap-guide, v0.38.2 (inactive)
language-c, v0.52.1 (inactive)
language-clojure, v0.21.0 (inactive)
language-coffee-script, v0.47.2 (inactive)
language-csharp, v0.12.1 (inactive)
language-css, v0.37.1 (inactive)
language-gfm, v0.88.0 (inactive)
language-git, v0.15.0 (inactive)
language-go, v0.42.1 (inactive)
language-html, v0.45.1 (inactive)
language-hyperlink, v0.16.0 (inactive)
language-java, v0.23.0 (inactive)
language-javascript, v0.119.0 (inactive)
language-json, v0.18.2 (inactive)
language-less, v0.29.5 (inactive)
language-make, v0.22.2 (inactive)
language-mustache, v0.13.0 (inactive)
language-objective-c, v0.15.1 (inactive)
language-perl, v0.35.0 (inactive)
language-php, v0.37.2 (inactive)
language-property-list, v0.8.0 (inactive)
language-python, v0.45.0 (inactive)
language-ruby, v0.69.0 (inactive)
language-ruby-on-rails, v0.25.0 (inactive)
language-sass, v0.56.0 (inactive)
language-shellscript, v0.22.4 (inactive)
language-source, v0.9.0 (inactive)
language-sql, v0.23.0 (inactive)
language-text, v0.7.1 (inactive)
language-todo, v0.28.0 (inactive)
language-toml, v0.18.0 (inactive)
language-xml, v0.34.9 (inactive)
language-yaml, v0.26.0 (inactive)
# Dev
No dev packages
Is it possible adding more concise instructions on installing Astyle. Have tried everything and have done the cmake route but still not working. Any advice is appreciated
I just downloaded and installed formatter-astyle for Atom, but I cannot figure out how to actually use it to format a file. Perhaps you could add a line to the documentation to either 1) tell us what the default key-binding is, or 2) how to create a key-binding, or 3) which menu we can find the formatting under. Thanks!
Under Windows, formatting ignores the line-ending setting of the file (LF) and uses the platform default (CRLF).
Might be related to #1
Sometimes a random line brake appear after formatting the file.
In MacOS the file is emptied by the function.
astyle is working properly in command line
formatter-astyle version: 0.2.0
AStyle version: 2.05.1
Atom version: 1.7.2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.