No autocomplete from generated bindings even with Evaluate Build Scripts enabled #6571
Labels
answered
Issues that have an answer and don't require additional action from maintainers
subsystem::build scripts
subsystem::code insight
General label for issues related to code understanding: highlighting, completion, annotation, etc.
subsystem::IDE
Issues related to general IDE functionality (tool windows, actions, etc.)
Environment
Problem description
Not receiving auto-complete (or related features, go-to defintion, etc.) for generated bindings even with (Experimental)
org.rust.cargo.evaluate.build.scripts = true
ORorg.rust.cargo.fetch.out.dir = true
In my example, I'm writing rust code to be used by the Godot game engine via Godot-Rust and the gdnative crate, which generates bindings to Godot's gdnative interface.VS Code will give auto-completion on this sort of thing, when enabling fetchOutDir in the rust analyzer plugin.
Reading through related issues like (#1908 and #6135), most of which seem closed/working, it seems relevant that the bindings in use are being generated inside of the dependency
gdnative
(https://github.com/godot-rust/godot-rust) and that gdnative uses a couple lines like this to include the bindings it generates frominclude!(concat!(env!("OUT_DIR"), "/generated.rs"));
This is my first bug report so I hope I didn't miss something obvious, but none of the answers I found worked for me. I'd really prefer to use IntelliJ / CLion on Godot projects, especially given it seems
evaluate.build.scripts
will be more performant than fetching OUT_DIR.Steps to reproduce
Using the very bare-bones Godot-Rust hello_world example project:
org.rust.cargo.evaluate.build.scripts = true
ORorg.rust.cargo.fetch.out.dir = true
examples/hello_world
cargo check
_owner.set_script(script)
Note that the project compiles and runs exactly as expected. All of the example projects in there suffer from the same problem with autocomplete though.
The text was updated successfully, but these errors were encountered: