mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
📝 Access config via atom.config not global.config
This commit is contained in:
@@ -12,19 +12,19 @@ configDirPath = fsUtils.absolute("~/.atom")
|
||||
# Public: Used to access all of Atom's configuration details.
|
||||
#
|
||||
# A global instance of this class is available to all plugins which can be
|
||||
# referenced using `global.config`
|
||||
# referenced using `atom.config`
|
||||
#
|
||||
# ### Best practices ###
|
||||
# ### Best practices
|
||||
#
|
||||
# * Create your own root keypath using your package's name.
|
||||
# * Don't depend on (or write to) configuration keys outside of your keypath.
|
||||
#
|
||||
# ### Example ###
|
||||
# ### Example
|
||||
#
|
||||
# ```coffeescript
|
||||
# global.config.set('myplugin.key', 'value')
|
||||
# global.observe 'myplugin.key', ->
|
||||
# console.log 'My configuration changed:', global.config.get('myplugin.key')
|
||||
# atom.config.set('myplugin.key', 'value')
|
||||
# atom.config.observe 'myplugin.key', ->
|
||||
# console.log 'My configuration changed:', atom.config.get('myplugin.key')
|
||||
# ```
|
||||
module.exports =
|
||||
class Config
|
||||
|
||||
Reference in New Issue
Block a user