@@ -182,7 +182,7 @@ async function serverEnv(toolchain, cwd) {
182
182
env . RUST_BACKTRACE = env . RUST_BACKTRACE || "1"
183
183
184
184
// if (!env.RUST_LOG && atom.config.get('core.debugLSP')) {
185
- // env.RUST_LOG = 'rls=warn,rls::build= info'
185
+ // env.RUST_LOG = 'info'
186
186
// }
187
187
188
188
try {
@@ -505,9 +505,9 @@ class RustLanguageClient extends AutoLanguageClient {
505
505
! filePath . includes ( '/target/release/' )
506
506
}
507
507
508
- // Killing servers is faster and less likely to get stuck.
508
+ // Killing servers is faster and less likely to get stuck, but let's see if rust-analyzer deserves grace.. .
509
509
shutdownServersGracefully ( ) {
510
- return false
510
+ return true
511
511
}
512
512
513
513
// Can click through to out-of-project files.
@@ -576,6 +576,24 @@ class RustLanguageClient extends AutoLanguageClient {
576
576
return provide
577
577
}
578
578
579
+ /**
580
+ * Hide unsupported rust-analyzer custom actions
581
+ * @param {(ls.Command | ls.CodeAction)[] } actions
582
+ * @returns {(ls.Command | ls.CodeAction)[] } filtered actions
583
+ */
584
+ filterCodeActions ( actions ) {
585
+ return actions . filter ( a => ! a . command || a . command . command !== "rust-analyzer.applySourceChange" )
586
+ }
587
+
588
+ // /**
589
+ // * TODO: Handle rust-analyzer custom actions
590
+ // * @param {(ls.Command | ls.CodeAction) } action
591
+ // * @returns {Promise<boolean> } continue with default handling
592
+ // */
593
+ // async onApplyCodeActions(action) {
594
+ // return true
595
+ // }
596
+
579
597
/**
580
598
* Extend base-class to workaround the limited markdown support.
581
599
* @param {TextEditor } editor
0 commit comments