mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2025-01-07 23:59:22 +03:00
Load the config from Atom class so as not to duplicate
This commit is contained in:
parent
5bf09716ef
commit
5fdf3f894c
@ -49,8 +49,5 @@ describe "the `atom` global", ->
|
||||
expect(version).toBe 'version'
|
||||
|
||||
describe "loading default config", ->
|
||||
beforeEach ->
|
||||
atom.loadConfig()
|
||||
|
||||
it 'loads the default core config', ->
|
||||
expect(atom.config.get('core.excludeVcsIgnoredPaths')).toBe true
|
||||
|
@ -91,16 +91,16 @@ beforeEach ->
|
||||
config = new Config({resourcePath, configDirPath: atom.getConfigDirPath()})
|
||||
spyOn(config, 'load')
|
||||
spyOn(config, 'save')
|
||||
config.setDefaults('core', WorkspaceView.configDefaults)
|
||||
config.setDefaults('editor', TextEditorView.configDefaults)
|
||||
atom.config = config
|
||||
atom.loadConfig()
|
||||
config.set "core.destroyEmptyPanes", false
|
||||
config.set "editor.fontFamily", "Courier"
|
||||
config.set "editor.fontSize", 16
|
||||
config.set "editor.autoIndent", false
|
||||
config.set "core.disabledPackages", ["package-that-throws-an-exception",
|
||||
"package-with-broken-package-json", "package-with-broken-keymap"]
|
||||
config.load.reset()
|
||||
config.save.reset()
|
||||
atom.config = config
|
||||
|
||||
# make editor display updates synchronous
|
||||
spyOn(TextEditorView.prototype, 'requestDisplayUpdate').andCallFake -> @updateDisplay()
|
||||
|
@ -603,9 +603,9 @@ class Atom extends Model
|
||||
@deserializeWorkspaceView()
|
||||
|
||||
loadConfig: ->
|
||||
@config.load()
|
||||
@config.setSchema('core', {type: 'object', properties: require('./workspace-view').config})
|
||||
@config.setDefaults('editor', require('./editor-view').configDefaults)
|
||||
@config.load()
|
||||
|
||||
loadThemes: ->
|
||||
@themes.load()
|
||||
|
Loading…
Reference in New Issue
Block a user