Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit 25337b7

Browse files
authored
Enhance windows specific functionality (#77)
* Add Windows filterChangeWatchedFiles implementation * Add windows prompt to install rustup implementation
1 parent ef30f37 commit 25337b7

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

lib/index.js

+22
Original file line numberDiff line numberDiff line change
@@ -618,4 +618,26 @@ class RustLanguageClient extends AutoLanguageClient {
618618
}
619619
}
620620

621+
// override windows specific implementations
622+
if (process.platform === "win32") {
623+
// handle different slashes
624+
// TODO ignore all files and wait for `client/registerCapability` as
625+
// in unix method
626+
RustLanguageClient.prototype.filterChangeWatchedFiles = filePath => {
627+
return !filePath.includes('\\.git\\') &&
628+
!filePath.includes('\\target\\rls\\') &&
629+
!filePath.includes('\\target\\debug\\') &&
630+
!filePath.includes('\\target\\doc\\') &&
631+
!filePath.includes('\\target\\release\\')
632+
}
633+
634+
// curl | sh is not valid for windows, users must install rustup manually
635+
RustLanguageClient.prototype._handleMissingRustup = () => {
636+
atomPrompt("`rustup` is not available", {
637+
description: "`rustup` is required for ide-rust functionality. " +
638+
"**Install from https://www.rustup.rs and restart atom**."
639+
})
640+
}
641+
}
642+
621643
module.exports = new RustLanguageClient()

0 commit comments

Comments
 (0)