mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Find standalone proc-macro-srv on windows too
This commit is contained in:
parent
e36a20c24f
commit
b1e3daf14b
@ -303,6 +303,9 @@ impl GlobalState {
|
|||||||
let files_config = self.config.files();
|
let files_config = self.config.files();
|
||||||
let project_folders = ProjectFolders::new(&self.workspaces, &files_config.exclude);
|
let project_folders = ProjectFolders::new(&self.workspaces, &files_config.exclude);
|
||||||
|
|
||||||
|
let standalone_server_name =
|
||||||
|
format!("rust-analyzer-proc-macro-srv{}", std::env::consts::EXE_SUFFIX);
|
||||||
|
|
||||||
if self.proc_macro_clients.is_empty() {
|
if self.proc_macro_clients.is_empty() {
|
||||||
if let Some((path, args)) = self.config.proc_macro_srv() {
|
if let Some((path, args)) = self.config.proc_macro_srv() {
|
||||||
self.proc_macro_clients = self
|
self.proc_macro_clients = self
|
||||||
@ -316,10 +319,8 @@ impl GlobalState {
|
|||||||
tracing::info!("Found a cargo workspace...");
|
tracing::info!("Found a cargo workspace...");
|
||||||
if let Some(sysroot) = sysroot.as_ref() {
|
if let Some(sysroot) = sysroot.as_ref() {
|
||||||
tracing::info!("Found a cargo workspace with a sysroot...");
|
tracing::info!("Found a cargo workspace with a sysroot...");
|
||||||
let server_path = sysroot
|
let server_path =
|
||||||
.root()
|
sysroot.root().join("libexec").join(&standalone_server_name);
|
||||||
.join("libexec")
|
|
||||||
.join("rust-analyzer-proc-macro-srv");
|
|
||||||
if std::fs::metadata(&server_path).is_ok() {
|
if std::fs::metadata(&server_path).is_ok() {
|
||||||
tracing::info!(
|
tracing::info!(
|
||||||
"And the server exists at {}",
|
"And the server exists at {}",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user