This repository was archived by the owner on Mar 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +0
-49
lines changed Expand file tree Collapse file tree 2 files changed +0
-49
lines changed Original file line number Diff line number Diff line change @@ -427,19 +427,6 @@ class RustLanguageClient extends AutoLanguageClient {
427
427
// Get required dependencies
428
428
await require ( "atom-package-deps" ) . install ( "ide-rust" )
429
429
430
- // // Watch rls.toml file changes -> update rls
431
- // this.disposables.add(atom.project.onDidChangeFiles(events => {
432
- // if (_.isEmpty(this.projects)) return
433
- //
434
- // for (const event of events) {
435
- // if (event.path.endsWith('rls.toml')) {
436
- // let projectPath = Object.keys(this.projects).find(key => event.path.startsWith(key))
437
- // let rlsProject = projectPath && this.projects[projectPath]
438
- // if (rlsProject) rlsProject.sendRlsTomlConfig()
439
- // }
440
- // }
441
- // }))
442
-
443
430
// watch config toolchain updates -> check for updates if enabling
444
431
this . disposables . add (
445
432
atom . config . onDidChange ( "ide-rust.checkForToolchainUpdates" , ( { newValue : enabled } ) => {
@@ -500,8 +487,6 @@ class RustLanguageClient extends AutoLanguageClient {
500
487
this . _refreshActiveOverrides ( )
501
488
} )
502
489
503
- // project.sendRlsTomlConfig()
504
-
505
490
this . _refreshActiveOverrides ( )
506
491
}
507
492
Original file line number Diff line number Diff line change 1
1
const path = require ( "path" )
2
2
const fs = require ( "fs" )
3
- const toml = require ( "toml" )
4
3
const _ = require ( "underscore-plus" )
5
4
6
5
/**
@@ -87,39 +86,6 @@ class RustProject {
87
86
busyMessage . lastProgressTitle = title
88
87
}
89
88
}
90
-
91
- // Send rls.toml as `workspace/didChangeConfiguration` message (or default if no rls.toml)
92
- sendRlsTomlConfig ( ) {
93
- const rlsTomlPath = path . join ( this . server . projectPath , "rls.toml" )
94
-
95
- fs . readFile ( rlsTomlPath , ( err , data ) => {
96
- const config = this . defaultConfig ( )
97
- if ( ! err ) {
98
- try {
99
- Object . assign ( config , toml . parse ( data ) )
100
- } catch ( e ) {
101
- console . warn ( `Failed to read ${ rlsTomlPath } ` , e )
102
- }
103
- }
104
-
105
- if ( _ . isEqual ( config , this . _lastSentConfig ) ) {
106
- return
107
- }
108
-
109
- this . server . connection . didChangeConfiguration ( {
110
- settings : {
111
- rust : config ,
112
- } ,
113
- } )
114
- this . _lastSentConfig = config
115
- } )
116
- }
117
-
118
- // Default Rls config according to package settings & Rls defaults
119
- /* eslint-disable-next-line class-methods-use-this */
120
- defaultConfig ( ) {
121
- return { }
122
- }
123
89
}
124
90
125
91
/**
You can’t perform that action at this time.
0 commit comments