-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Lsp not working in cargo check -r #14315
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
Comments
What did you change and does it work if you change it back? Do the other features like completion work? |
@lnicola Wait its compliling the project |
@lnicola Yes it working fine in debug mode , but nothing works in release mode not hover not code actions or completiong also |
Bro its my issue only |
Lol i only have opened that issue |
I know, but you didn't say how you configured it, so I linked to the place where you did. |
OoO sorry i though that ... |
What does |
rust-analyzer 0.3.1369-standalone |
Try: local settings = {
["rust-analyzer"] = {
check = {
extraArgs = {"-r"},
},
},
}
-- ...
nvim_lsp[name].setup {
on_attach = on_attach,
settings = settings
} See https://github.com/neovim/nvim-lspconfig#suggested-configuration or https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rust_analyzer. |
Fixed it idk how but yeah
|
You're registering it twice, I'm not sure that's a good idea. |
@lnicola Yes but can this work
Sorry if the syntax is wrng, Currently i am not on my pc right on and i don't know lua lol 🇹🇩 |
Why not this? local on_attach = require("plugins.configs.lspconfig").on_attach
local capabilities = require("plugins.configs.lspconfig").capabilities
local lspconfig = require "lspconfig"
lspconfig.pyright.setup {on_attach = on_attach, capabilities = capabilities}
lspconfig.rust_analyzer.setup {
on_attach = on_attach,
settings = {["rust-analyzer"] = {check = {extraArgs = {"-r"}}}}
} Anyway, I noticed you've reopened both issues. Are you still having trouble with this? |
@lnicola Nope not working it makes both a debug and a relase dir I think that the hover, completion and code actions both need the debug build to work But if i delete the debug dir from neovim itself the every thing works fine but if i quit neovim and the start it again it seems to build the debug dir again. Idk what is happning. And yes i opened the issue again coz it could be that their is a bug in nvim lsp. |
@lnicola Idk what is happening Its a screen shot of rust-analyzer extraArgs by mason (the lsp installer) Btw can i set cargo check to cargo check -r by default so that if any where cargo check run's |
Yes, it works, with Even in release mode, some dependencies like build scripts and proc macros are not optimized. On a test project with a single dependency,
I don't know if that's possible. You can probably make an alias like shown in https://doc.rust-lang.org/cargo/reference/config.html. |
True for a small project like with rand,
I have nothing inside that |
@lnicola it would be a great great favour if you could test this project in your computer Btw thanks for trying to help me for so long |
I recently updated my ra's config to run ** cargo check -r ** insted of cargo check (debug mode)
Because i usually run my projects in release mode.
I use nvim-lspconfig and i keymapped "K" to show the hover (Just like in vscode). But it show this error
**edit: I just got to know that lol the lsp is only working. Idk what is this But i think that for ra to get compleition , code action and hover working it needs to get a debug build**
man.lua: "no manual entry for PathBuf"
when i try to get hover for PathBuf.
Is this a bug or a release issue idk. Btw thanks for help and also for build such a great software
minimal config
The text was updated successfully, but these errors were encountered: