rust-tools.nvim icon indicating copy to clipboard operation
rust-tools.nvim copied to clipboard

proc macro not expanded: Proc macros are disabled

Open christopher-wilke opened this issue 2 years ago • 8 comments

I see a warning when running [tokio::main]:

proc macro "main" not expanded: Proc macros are disabled.

Is there any way to disable this warning?

christopher-wilke avatar Jun 07 '23 12:06 christopher-wilke

yeah same, this happens if i go to definition and it opens some other dep of the project, it starts building all the stuff and then I get this everywhere too. Super annpying

0xDmtri avatar Jun 17 '23 14:06 0xDmtri

Yes I have this exact same problem, the macro expansion still works though even after it mentions this error...

qdrs avatar Jun 23 '23 08:06 qdrs

I also have this problem. I use the original lsp-config without using rust-tools to solve this problem well, and it is faster than rust-tools.

52funny avatar Jul 02 '23 05:07 52funny

I also have this problem. I use the original lsp-config without using rust-tools to solve this problem well, and it is faster than rust-tools.

Do u have inlay hinting there too? If yes, would you mind sharing this part of your config please! Cheers!

0xDmtri avatar Jul 04 '23 16:07 0xDmtri

I also have this problem. I use the original lsp-config without using rust-tools to solve this problem well, and it is faster than rust-tools.

Do u have inlay hinting there too? If yes, would you mind sharing this part of your config please! Cheers!

You can refer to this:reddit

This post says that Native LSP Inlay Hint is already supported in the Nightly version of neovim.

52funny avatar Jul 05 '23 02:07 52funny

Is there any way I can reproduce this?

simrat39 avatar Jul 11 '23 00:07 simrat39

Is there any way I can reproduce this?

yes ser, all u need to do is to open some rust project, for example, something that uses tokio::spawn(), and then do "go to definition" on "spawn()" method or any other method u r using from an external crate. Rust analyzer will start fetching everything and then it will produce this warning. The warning will stay until u restart the lsp and u will see this warning even in the original code from where you jumped from.

0xDmtri avatar Jul 21 '23 15:07 0xDmtri

I'm not sure about the exact steps to reproduce but it happens pretty often to me. Any proc macro can trigger this, not necessarily tokio::main. LspRestart doesn't always help when that happens, only restarting neovim reliably does.

aqrln avatar Aug 14 '23 09:08 aqrln