File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 11const cp = require ( "child_process" ) ;
2+ const shellEnv = require ( "shell-env" ) ;
23const { shell } = require ( "electron" ) ;
34const { AutoLanguageClient } = require ( "atom-languageclient" ) ;
45
@@ -16,9 +17,12 @@ class PythonLanguageClient extends AutoLanguageClient {
1617 getServerName ( ) {
1718 return "pyls" ;
1819 }
19- startServerProcess ( projectPath ) {
20+
21+ async startServerProcess ( projectPath ) {
22+ const env = await shellEnv ( ) ;
2023 const childProcess = cp . spawn ( atom . config . get ( "ide-python.pylsPath" ) , {
21- cwd : projectPath
24+ cwd : projectPath ,
25+ env : env
2226 } ) ;
2327 childProcess . on ( "error" , err =>
2428 atom . notifications . addError (
Original file line number Diff line number Diff line change 1717 "atom" : " >=1.0.0 <2.0.0"
1818 },
1919 "dependencies" : {
20- "atom-languageclient" : " ^0.6.1"
20+ "atom-languageclient" : " ^0.6.1" ,
21+ "shell-env" : " ^0.3.0"
2122 },
2223 "enhancedScopes" : [" source.python" ],
2324 "configSchema" : {
You can’t perform that action at this time.
0 commit comments