use init.js by default

This commit is contained in:
Sertonix 2022-11-03 14:15:11 +01:00
parent a42147ffec
commit 00a91b46e7
4 changed files with 15 additions and 13 deletions

View File

@ -145,7 +145,7 @@ Include details about your configuration and environment:
* **What's the name and version of the OS you're using**?
* **Are you running Atom in a virtual machine?** If so, which VM software are you using and which operating systems and versions are used for the host and the guest?
* **Which [packages](#atom-and-packages) do you have installed?** You can get that list by running `apm list --installed`.
* **Are you using [local configuration files](https://flight-manual.atom.io/using-atom/sections/basic-customization/)** `config.cson`, `keymap.cson`, `snippets.cson`, `styles.less` and `init.coffee` to customize Atom? If so, provide the contents of those files, preferably in a [code block](https://help.github.com/articles/markdown-basics/#multiple-lines) or with a link to a [gist](https://gist.github.com/).
* **Are you using [local configuration files](https://flight-manual.atom.io/using-atom/sections/basic-customization/)** `config.cson`, `keymap.cson`, `snippets.cson`, `styles.less` and `init.js` to customize Atom? If so, provide the contents of those files, preferably in a [code block](https://help.github.com/articles/markdown-basics/#multiple-lines) or with a link to a [gist](https://gist.github.com/).
* **Are you using Atom with multiple monitors?** If so, can you reproduce the problem when you use a single monitor?
* **Which keyboard layout are you using?** Are you using a US layout or some other layout?

View File

@ -1,11 +0,0 @@
# Your init script
#
# Pulsar will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
# console.log "Saved! #{editor.getPath()}"

13
dot-atom/init.js Normal file
View File

@ -0,0 +1,13 @@
// Your init script
//
// Pulsar will evaluate this file each time a new window is opened. It is run
// after packages are loaded/activated and after the previous editor state
// has been restored.
//
// An example hack to log to the console when each text editor is saved.
//
// atom.workspace.observeTextEditors(editor =>
// editor.onDidSave(() =>
// console.log(`Saved! ${editor.getPath()}`)
// )
// );

View File

@ -1540,7 +1540,7 @@ or use Pane::saveItemAs for programmatic saving.`);
'js',
'coffee'
]);
return initScriptPath || path.join(this.getConfigDirPath(), 'init.coffee');
return initScriptPath || path.join(this.getConfigDirPath(), 'init.js');
}
requireUserInitScript() {