According to Merge #11360 · rust-lang/rust-analyzer@cd6521e · GitHub rust-analyzer should support the recursion_limit
directive in the source code or as a crate attribute. However, it doesn't seem to work for me.
I have an example repo that demonstrates the issue I'm seeing: GitHub - edevil/rust-analyzer-recursion: Example that triggers RA issue with recursion limit in macros
If you try to go to the definition of ServerError
in main.rs, LSP can't find it. This seems to be related to the recursion limit because if I remove a bunch of the Enum cases it starts to work. I have set the recursion_limit directive in the top of the main file, and have also tried setting it as a crate attribute, but it didn't work.
If I remove this directive I get an actual error from the Rust compiler.
Am I missing something here? Thanks.