Commit Graph

326 Commits

Author SHA1 Message Date
Glavin Wiechert 66c1522dcc Closes #178. Change commands' namespace from "beautify" to "atom-beautify" 2015-05-06 13:00:51 -03:00
Glavin Wiechert a94721e1b5 Closes #308. Beautify On Save is opt-in for each language
Deprecate old global beautifyOnSave option
2015-05-06 12:35:34 -03:00
Glavin Wiechert d1b0e6d66d See #296. Add package option for setting logger level 2015-05-06 12:34:58 -03:00
Glavin Wiechert 2b7bbb35a7 See #317. Use Warning notification, improve message for unsupported lang 2015-05-05 14:46:18 -03:00
Glavin Wiechert d58f688dab Closes #317. Switch from addFatalError to addError for showing errors
Fatal Error notifications were scaring the users
2015-05-05 13:08:50 -03:00
Glavin Wiechert bdb1fc0d38 Fixes #289. Remove deprecated subscription call to TextBuffer.on
Also `beautify on save` is checked on every save,
not just on Atom Beautify activation / startup.
2015-05-05 13:01:58 -03:00
Glavin Wiechert 8bcf4efcfa Fixes #305. Beautify input in single temp file for HTMLBeautifier
- Enable HTMLBeautifier tests for Travis CI
2015-05-04 02:32:25 -03:00
Glavin Wiechert 1dfac5bbab Closes #296. Add logging to `Help Debug Editor` command 2015-05-04 02:12:02 -03:00
Glavin Wiechert 88c58a20bb See #296. Add Logging API to Beautifier 2015-05-03 14:50:33 -03:00
Glavin Wiechert cc9b8e8ff2 See #294. Add missing argument to PHP-CS-Fixer beautifier
And enable tests for Travis CI
2015-05-03 12:50:45 -03:00
Glavin Wiechert 141bca7aba Add support for beautifiers ignoring CLI return code
Rubocop always returns an error code (1) instead of a good code (0) so
the beautifier has now been configured to ignore the return code / exit
status for only Rubocop beautifier. Other beautifiers will properly
return error when an bad return code is received.
2015-05-03 12:22:24 -03:00
Glavin Wiechert b5c3098778 Fixes #301. Fix autopep8 beautifier's arguments 2015-05-03 12:00:33 -03:00
Glavin Wiechert 4eed4cfc21 See #292. Add more Markdown with YAML Front Matter tests 2015-05-03 11:39:46 -03:00
Glavin Wiechert 1fd94e871b Closes #192. Add coffee-fmt beautifier for CoffeeScript language 2015-05-03 01:57:17 -03:00
Glavin Wiechert 0a0ba673e8 Closes #176. Add gofmt beautifier for Golang language 2015-05-03 01:23:29 -03:00
Glavin Wiechert 81fde0c9ea Closes #209. Add CSScomb beautifier for CSS/LESS/SCSS/Sass languages.
To switch from `JS Beautify` (CSS) or `Pretty Diff` (SCSS/Sass/LESS) to
using `CSScomb`, you will go into Atom Beautify package settings and
find the option for `Language Config - <Your Desired Language: CSS, etc>
- Default Beautifier` and select `CSScomb`.

CSScomb looks for a `.csscomb.json` file in your Atom's first project
directory. If it does not find one, or if importing it fails, it will
fallback to `csscomb` predefined configuration.
2015-05-03 01:01:33 -03:00
Glavin Wiechert 38b760ee6a Merge branch 'master' of git://github.com/jney/atom-beautify into jney-master
Conflicts:
	lib/langs/ruby-beautify.coffee
	lib/language-options.coffee
2015-05-02 20:53:53 -03:00
Glavin Wiechert 48af4a3ff6 See #282, #284. Move language options out of option of type `object`
See Atom Settings-View bug:
https://github.com/atom/settings-view/issues/386#issuecomment-98379708
2015-05-02 14:06:50 -03:00
Glavin Wiechert a2262619ad Closes #284, #282. Language config options in Package settings
Language config options for:
- disabled - Disable beautifying a language
  - `disabled_languages` no longer works
  - use the options for each language to disable them
- default_beautifier - Preferred beautifier to use for language
  - if there are multiple beautifiers for a language it will choose the
    beautifier the user has set as default. Initially the default
    beautifier is just the first beautifier to register support for that
    language
2015-05-02 12:55:37 -03:00
Glavin Wiechert a30dc62510 See #282. Fix getLanguages for finding by name and namespace
- Was causing "Duplicate option" warnings
2015-05-01 03:53:25 -03:00
Glavin Wiechert 9211a03c16 See #282. Improve Beautifier options definition handling
What's new:
- Beautifier options definition supports:
    - boolean - enable/disable
    - string - rename and enable
    - function - transform and enable
    - array - apply complex transformation to multiple options and
      output single option result
- Show "Supported by <beautifiers>" for each language option
    - Beautifiers have a name
    - Beautifier options definition is used to determine if
    language option is supported by a beautifier
- Remove SQL test, since sqlformat is inconsistant
2015-05-01 02:32:02 -03:00
Glavin Wiechert 26ab3ec198 See #282. Add global language option transforms for beautifier
Beautifier can have global language option transforms
with "_" (underscore) key.
2015-04-30 16:45:45 -03:00
Glavin Wiechert 1a92e608d5 See #164. Remove CLI Path options for CLI beautifiers
CLI beautifiers no longer need hardcoded/fixed paths
to their executable, since the PATH and
other environment variables are being auto-detected
2015-04-30 15:53:24 -03:00
Glavin Wiechert 240368fb09 Closes #164. Auto-detect Shell environment variables 2015-04-30 15:13:53 -03:00
Glavin Wiechert 0b1d0216d9 All tests should pass with new internal API 2015-04-30 13:23:41 -03:00
Glavin Wiechert 7432334d08 See #282. Restructure internal API
Done:
- Create base Beautifier class
- All Languages are separate files
- Options are separated for each language
- Beautifiers reference applicable Languages/Options
- Atom Beautify builds and tests can run
  - 19 failures out of 34 tests

TODO:
- Render Language Options to Atom Package Settings
- Support for Language fallback option namespaces
- Support for chosing from multiple applicable beautifiers
2015-04-29 04:50:09 -03:00