lapce / lapce-rust

Apache License 2.0
80 stars 26 forks source link

Cannot specify path to rust-analyzer on windows #34

Closed toadslop closed 7 months ago

toadslop commented 1 year ago

This line always results in an error on windows, making it impossible to specify the path to rust-analyzer.

let exits = PLUGIN_RPC
            .execute_process(program.to_string(), vec![server_path.to_string()])
            .map(|r| r.success)
            .unwrap_or(false);

Looking at the sourceode, it executes the program "where" with the path you provide. This does not work. Here is an example of the output:

where C:\Users\bnhei\.cargo\bin\rust-analyzer.exe
ERROR: Invalid pattern is specified in "path:pattern".

As we can see, we cannot simply input the path to rust analyzer with the where command. It will always fail. The correct format for this command is: {path-to-folder}:{filename-pattern-matcher}.

eckce commented 11 months ago

Same issue on Linux. Using lapce nightly. Rust plugin installed via lapce UI.

image image image

humphreylee commented 7 months ago

bumped.