Skip to content

Instantly share code, notes, and snippets.

@maxbrunsfeld
Last active August 29, 2015 14:11
Show Gist options
  • Save maxbrunsfeld/1fff752aedd1b9c8bad0 to your computer and use it in GitHub Desktop.
Save maxbrunsfeld/1fff752aedd1b9c8bad0 to your computer and use it in GitHub Desktop.
Proposed Config API
class Config
# Essential: Sets the value for a configuration setting, associated with a given
# file path.
#
# * `sourcePath` {String} the file path responsible for the setting
# * `scopeSelector` (optional) {String}. eg. '.source.ruby'
# See [the scopes docs](https://atom.io/docs/latest/advanced/scopes-and-scope-descriptors)
# for more information.
# * `keyPath` The {String} name of the key.
# * `value` The value of the setting. Passing `undefined` will revert the
# setting to the default value.
#
# If the value was set, returns a {Disposable} that can be used to remove the setting.
# If the value was not able to be coerced to the type specified in the setting's schema, returns `null`.
setWithSource: (sourcePath, scopeSelector, keyPath, value) ->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment