-
-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Is there a way to reliably recall the executable files installed by the installer? #777
Comments
Are you using windows-gnu toolchain? So, rust-analyzer does not provided for gnu toolchain. But you can use msvc toolchain instead. If you are using x86-64 arch PC, please install rust-analyzer-x86_64-pc-windows-msvc.zip, and put rust-analyzer.exe into your PATH somewhere. It should work since rust-analyzer works as single binary. |
Thank you for your comment. However, I was concerned that the installed binary of vim-lsp-setting might not be used (highly). Shouldn't we prioritize the ones installed via the installer over the ones on the path? |
Then, you should uninstall the binary |
Sorry, I'm confused. I thought vim-lsp-settings was designed to use binaries installed with install-xxx.(sh|cmd). I thought it was designed to first look for PATH, and if it wasn't found in PATH, it would use the binary installed by the installer. † I'd like to talk about the design of vim-lsp-settings, not just rust-analyzer. I'm sorry, I can't write in English well, so I will write in Japanese. vim-lsp-settings は、 PATH にあるか探し、 PATH に無ければインストーラーがインストールしたバイナリを実行するものだと思っていました。 |
作っておいてアレなんですが、たしかインストーラが使われていたらそちらを、無ければパス内のものを、という動きにしていた気がしています。 |
あれ?そうなのですか、私の勘違いでしたか。もう一度挙動とソースを確認してみます。 |
間違えて閉じてしまいました... 確認したところ、初期実装(?)の頃から「まず PATH を探して、無ければ ■ 現在の実装 PATH, vim-lsp-settings/autoload/lsp_settings.vim Lines 225 to 269 in 02cd145
■ 初期(?)実装 PATH から探す処理の後ろに追加する形で初期(?)実装が行われている。 fef383e#diff-d7bcd9bf24c66b67490ed72182bce5de4a813ddbdd141d1fa21511bf8b5ee981R19 |
本来の優先順位としては、 「インストールされたもの > |
LspSettingsGlobalEdit で cmd を直接パス指定するのではだめでしょうか? |
せっかくインストールしたものが使われないのがもったいないと思いましたが、こういう状況になるのは rust-analyzer くらいですかね。 それを考えると確かに設定や環境でカバーするほうが良いと思えてきました。 |
Is there a way to reliably recall the executable files installed by the installer?
(* not the executable in the path)
I try
:LspInstallServer rust-analyzer
, but rustup's default install rust is put dummyrust-analyzer
in PATH.(See: rust-lang/rustup#3846)
So, vim-lsp will also occur the following error.
lsp_settings#exec_path('rust-analyzer')
is first search PATH environment.vim-lsp-settings/settings/rust-analyzer.vim
Line 5 in 02cd145
vim-lsp-settings/autoload/lsp_settings.vim
Line 225 in 02cd145
Can I call executable without PATH environment?
The text was updated successfully, but these errors were encountered: