Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

proc macro not expanded: Proc macros are disabled #389

Open
christopher-wilke opened this issue Jun 7, 2023 · 8 comments
Open

proc macro not expanded: Proc macros are disabled #389

christopher-wilke opened this issue Jun 7, 2023 · 8 comments

Comments

@christopher-wilke
Copy link

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?

@0xDmtri
Copy link

0xDmtri commented Jun 17, 2023

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

@qdrs
Copy link

qdrs commented Jun 23, 2023

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

@52funny
Copy link

52funny commented Jul 2, 2023

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.

@0xDmtri
Copy link

0xDmtri commented Jul 4, 2023

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!

@52funny
Copy link

52funny commented Jul 5, 2023

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.

@simrat39
Copy link
Owner

Is there any way I can reproduce this?

@0xDmtri
Copy link

0xDmtri commented Jul 21, 2023

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.

@aqrln
Copy link

aqrln commented Aug 14, 2023

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants