Skip to content

Commit 05a987b

Browse files
committed
Defer package activation until shell env is loaded
This PR defers package activation until the shell environment is loaded. This should speed up startup time of Atom and doesn't impact `ide-python` since we need to wait for the shell environment to be loaded anyway. See prettier/prettier-atom#485
1 parent 02cd170 commit 05a987b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/main.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ class PythonLanguageClient extends AutoLanguageClient {
4646
}
4747

4848
async startServerProcess(projectPath) {
49-
await new Promise(resolve => atom.whenShellEnvironmentLoaded(resolve));
5049
const venvPath =
5150
(await detectPipEnv(projectPath)) ||
5251
(await detectVirtualEnv(projectPath));

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
"enhancedScopes": [
3535
"source.python"
3636
],
37+
"activationHooks": [
38+
"core:loaded-shell-environment"
39+
],
3740
"configSchema": {
3841
"python": {
3942
"title": "Python Executable",

0 commit comments

Comments
 (0)