From 4e3c8406ee70b6544a3e52c99fb484362bbec225 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Fri, 3 Oct 2014 11:57:35 -0700 Subject: [PATCH] Clean up docs --- src/config.coffee | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/config.coffee b/src/config.coffee index ffffa263d..c14180b25 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -334,7 +334,9 @@ class Config # # do stuff with value # ``` # - # * `scopeDescriptor` (optional) {Array} of {String}s. See {::get} for examples + # * `scopeDescriptor` (optional) {Array} of {String}s describing a path from + # the root of the syntax tree to a token. Get one by calling + # {TextEditor::scopesAtCursor}. See {::get} for examples. # * `keyPath` {String} name of the key to observe # * `callback` {Function} to call when the value of the key changes. # * `value` the new value of the key @@ -368,7 +370,9 @@ class Config # Essential: Add a listener for changes to a given key path. If `keyPath` is # not specified, your callback will be called on changes to any key. # - # * `scopeDescriptor` (optional) {Array} of {String}s. See {::get} for examples + # * `scopeDescriptor` (optional) {Array} of {String}s describing a path from + # the root of the syntax tree to a token. Get one by calling + # {TextEditor::scopesAtCursor}. See {::get} for examples. # * `keyPath` (optional) {String} name of the key to observe. Must be # specified if `scopeDescriptor` is specified. # * `callback` {Function} to call when the value of the key changes. @@ -423,11 +427,13 @@ class Config # Additionally, you can get the setting at the specific cursor position. # # ```coffee - # scopeDescriptor = @editor.scopesForBufferPosition(@editor.getCursorBufferPosition()) + # scopeDescriptor = @editor.scopesAtCursor() # atom.config.get(scopeDescriptor, 'editor.tabLength') # => 2 # ``` # - # * `scopeDescriptor` (optional) {Array} of {String}s. + # * `scopeDescriptor` (optional) {Array} of {String}s describing a path from + # the root of the syntax tree to a token. Get one by calling + # {TextEditor::scopesAtCursor} # * `keyPath` The {String} name of the key to retrieve. # # Returns the value from Atom's default settings, the user's configuration