Commit Graph

65 Commits

Author SHA1 Message Date
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