Closed ca-mantis-shrimp closed 2 years ago
Hello! When you're able to set it up via both rust-tools and lspconfig, are all other things equal (i.e., exact same project, same system, same version of rust-analyzer
)? After some quick research, os error 5
seems to be some WSL-related file permission error.
What does the LSP log say? :exe 'tabnew ' .. luaeval("vim.lsp.get_log_path()")
Hey @williamboman,
TY for your time! I will answer in order.
--server
flag.[ERROR][2022-01-02 17:18:35] .../vim/lsp/rpc.lua:417 "rpc" "rust-analyzer" "stderr" '[ERROR rust_analyzer::reload] failed to switch workspaces: rust-analyzer failed to load workspace: "cargo" "--version" failed: Input/output error (os error 5)\n\n'
Posting a follow-up.
So today I updated to 0.6.1 AppImage.
I now get the error that runs when you try to open a rust file while rust-tools is installed, but didn't actually run the setup
function
Error Code: Error detected while processing VimEnter Autocommands for "*.rs":
E5108: Error executing lua ...ite/pack/packer/start/rust-tools.nvim/lua/rust-tools.lua:176: attempt to index local 'lsp_opts' (a nil value)
stack traceback:
...ite/pack/packer/start/rust-tools.nvim/lua/rust-tools.lua:176: in function 'start_standalone_if_required'
[string ":lua"]:1: in main chunk
This implies that the new startup changes that recently came to rust-tools for the standalone issue might be at fault?
I now get the error that runs when you try to open a rust file while rust-tools is installed, but didn't actually run the
setup
function
Ah so you can now reproduce the issue without using nvim-lsp-installer? I'm at a loss as to what might be happening - if I had to guess this is a WSL-specific file permissions issue. If there was a reproducible minimal config or environment, this would be easier to debug from my end.
I now get the error that runs when you try to open a rust file while rust-tools is installed, but didn't actually run the
setup
functionAh so you can now reproduce the issue without using nvim-lsp-installer? I'm at a loss as to what might be happening - if I had to guess this is a WSL-specific file permissions issue. If there was a reproducible minimal config or environment, this would be easier to debug from my end.
Ill rework my config in a new branch to get a minimal config. Thank you for your patience and help!
Hey so I've created a new issue template for these kinds of issues, it contains a minimal_debug_init.lua
which should be used when describing how to reproduce the issue. I'll close this issue as I'm unable to reproduce it, but please file a new one using the issue template if you think it's still relevant!
Just a final comment before I leave this. I should note that this workspace error went away with one of the recent updates to rust-tools, I think there was just a temporary workspace bug that should be fixed now with the newest version of rust tools. Thanks as always for your triage and patience!
Describe the bug So I've been using LSP-Installer for awhile now, and what is really weird is that my config was working a few days ago!
I'm trying to make this work with the rust-tools extension, but this bug shows up whether I configure it with the rust-tools plugin, or simply using the basic rust-analyzer setup laid out in the README. I have a pretty minimal configuration, and besides a basic configuration for sumneko lua, rust is the only language I am trying to get working at the moment (so no complex LSP switching logic).
The reason I think this is an lis-installer issue is because I can get the configuration working fine if I create the LSP server using only the rust-tools plugin.
So this is why I think it is an lsp-install issue that may have arisen from a recent change in the rust analyzer code.
Expected behavior When I open a rust file, I expect to simply begin editing, and see diagnostics as I begin typing.
Screenshots If applicable, add screenshots to help explain your problem.
System info (please complete the following information): Windows 10
:checkhealth nvim-lsp-installer
):Please also include any other system information you think is relevant!
Install log Not applicable, rust analyzer seems to be installed fine, but the plugin is having trouble seeing the actual workspace
Thank you for taking the time to read my Issue, happy to answer any questions. Appreciate the work, love using your plugin!