Commit Graph

48 Commits

Author SHA1 Message Date
Kevin Sawicki
25b75b6659 Use fs.resolve instead of fs.resolveExtension 2013-02-04 12:51:04 -08:00
Kevin Sawicki
bd88a0de15 Support CSON config file
Use ~/.atom/config.cson as the new default when no
config file exists.

~/.atom/config.json is still the default if they both
exist.
2013-02-04 12:38:00 -08:00
Justin Palmer
82f1fb4420 load user.coffee from .atom directory 2013-01-30 15:34:38 -08:00
Kevin Sawicki
2001cc330f Remove unused requires 2013-01-29 10:22:57 -08:00
Jon Rohan
e1e764418b making the packageDirPaths order back to the way it was 2013-01-22 13:17:06 -08:00
Jon Rohan
379824f6b0 adding vendor/themes and themes to themeDirPaths 2013-01-22 12:41:59 -08:00
Jon Rohan
20e5b303a7 refactoring all the stylesheets into /Atom - Dark/
Conflicts:
	.atom/themes/Atom - Dark/vim-mode.css
2013-01-17 22:11:45 -08:00
Kevin Sawicki & Nathan Sobo
ac3c059246 Extract _.setValueForKeyPath to underscore extensions 2013-01-10 18:02:55 -07:00
Nathan Sobo
d509093076 Don't write config defaults out to config.json 2013-01-04 17:08:25 -07:00
Kevin Sawicki
4078046ac6 Vendor textmate bundles as submodules 2013-01-04 08:18:52 -08:00
Nathan Sobo
0f59f5f58a Rename config "update" event to "updated" 2013-01-02 13:48:10 -07:00
Nathan Sobo
2d73aa292d Make theme loading more similar to package loading
These changes are mostly aesthetic in nature. I just thought it would 
be a good idea to have theme loading be parallel to package loading as
much as possible. So I localized more logic on the `atom` global.
2012-12-31 14:18:45 -06:00
Nathan Sobo
fa7bcfe51b Bundle a themes directory so we don't depend on ~/.atom/themes
We'll look first in the user themes directory, then in the built-in
themes directory. This allows us to default to 'IR_Black' and not crash
if the user doesn't setup their `~/.atom/themes` directory.
2012-12-31 12:08:36 -06:00
Corey Johnson
4a6d336763 Theme.load can take multiple theme names 2012-12-27 16:13:53 -08:00
Corey Johnson
4244e673af Load themes from Config.load 2012-12-27 15:52:09 -08:00
Corey Johnson
e5e5c497e1 Load themes from ~/.atom/themes 2012-12-26 17:41:48 -08:00
Nathan Sobo
886995364f Start on syntax global. Use it to replace scoped config settings.
We'll store all syntax-related global state in the `syntax` global. For
now, this means that all scoped properties will be stored here, as well
as all grammars.
2012-12-23 12:50:58 -07:00
Nathan Sobo
9b6c310239 Implement scoped config settings
You can pass a scope stack when calling `config.get`, which will prefer
settings under the most specific matching scope selector for the given
scope stack.
2012-12-21 18:20:20 -07:00
Nathan Sobo
356702c2f3 Clone defaults in config constructor so they aren't mutated.
This fixes failures caused pollution of state between specs
2012-12-20 22:13:12 -07:00
Nathan Sobo
0ca1440026 Oops. Don't overwrite user config w/ defaults before its loaded 2012-12-20 21:40:08 -07:00
Nathan Sobo
c7605b8aa6 Move loadPackages to atom global. Handle '-tmbundle' in regex.
This simplifies the loading of TextMate bundles in the spec and benchmark helpers. Since `loadBundle` was already implemented on `atom`, it made sense to move this logic here. Config is now more focused on its core job of handling configuration, not loading bundles.
2012-12-20 21:34:07 -07:00
Nathan Sobo
dd8597cc9c Set config defaults in its constructor 2012-12-20 21:30:37 -07:00
Corey Johnson
0515274e2f TextMate bundles end in .tmbundle or _tmbundle 2012-12-20 17:01:12 -08:00
Corey Johnson
5ea9a4d365 Load TextMate Bundles from packages directories 2012-12-20 16:25:08 -08:00
Corey Johnson
972d3e5536 💄 2012-12-20 10:34:36 -08:00
Nathan Sobo
4ce8583cb2 Rename extensions to packages
We now look at the `core.disabledPackages` config key. Rename the `src/extensions` directory to `src/packages`. The config object now talks about loading packages instead of extensions.
2012-12-18 20:03:21 -07:00
Nathan Sobo
37f0aa3f90 Replace window.requireExtension with atom.loadPackage
The goal is that `loadPackage` will be the go-to place for loading all kinds of resources out of directories. `requireExtension` was only designed to load and activate extension modules.
2012-12-18 19:47:20 -07:00
Nathan Sobo
e2457b90ac Disable extensions w/ config.core.disabledExtensions
This replaces the `config.core.extensions` array with just an array of the extensions you don't want to load. The previous solution was attempting to allow the user to control extension load order, but we're not actually sure that's a good idea and this is simpler.
2012-12-17 21:06:36 -07:00
Nathan Sobo
fc9bf38a2a *Must* use get and set to access config values.
The `config` object no longer stores config properties directly. Instead it stores them on an internal `settings` object, which makes it easier to serialize settings without getting them mixed up with non-setting state on the `config` object.
2012-12-17 20:56:37 -07:00
Nathan Sobo
b82fe25b99 When observing a key path, compare its new & old values structurally 2012-12-17 19:00:47 -07:00
Nathan Sobo
a7d1a29748 Use config.get/set methods. config.update now takes no args. 2012-12-17 18:52:20 -07:00
Corey Johnson & Nathan Sobo
6aafb73389 Add get and set to config 2012-12-17 16:37:27 -08:00
Nathan Sobo
2892ec9ecf Put user extensions directory (~/.atom/extensions) on the load path 2012-12-16 12:14:39 -08:00
Nathan Sobo
001a6500c6 Config requires all non-banged extensions listed in core.extensions 2012-12-16 11:25:52 -08:00
Nathan Sobo
bc7dc5d911 💄 2012-12-16 11:24:55 -08:00
Nathan Sobo
20bd670d8e 💄 2012-12-16 11:06:47 -08:00
Nathan Sobo
64ff05d481 Simplify config.core.extensions array 2012-12-14 17:14:58 -08:00
Nathan Sobo
b7fd9debd6 Only call once after registering extensions 2012-12-14 17:03:12 -08:00
Corey Johnson & Nathan Sobo
cc44508b58 Register extensions in core.extensions on Config.load 2012-12-14 16:38:44 -08:00
Corey Johnson & Nathan Sobo
e6362af711 Rename subscription.destroy to subscription.cancel 2012-12-14 16:38:04 -08:00
Corey Johnson & Nathan Sobo
8a675fd538 Use config.update w/ a key path everywhere we update the config 2012-12-14 15:21:36 -08:00
Kevin Sawicki & Nathan Sobo
b91c353d2b Add View#observeConfig as a space-pen extension 2012-12-14 14:08:57 -08:00
Nathan Sobo
0a1b389994 Add Config#observe, which watches a key path for changes 2012-12-12 18:19:02 -08:00
Nathan Sobo
c19c9e0d1f Save config changes on update 2012-12-12 15:49:01 -08:00
Nathan Sobo
3c2b84a46d Add config.editor.fontSize 2012-12-12 15:23:36 -08:00
Nathan Sobo
b3303bc21d Add config.editor.showInvisibles 2012-12-12 13:50:58 -08:00
Nathan Sobo
d89549c58a Load config from config.json. Set theme with config.core.theme. 2012-12-12 12:15:08 -08:00
Nathan Sobo
9c31ab3a79 Add global config object. Config#load loads user's atom.coffee. 2012-12-12 11:40:09 -08:00