gdnative: bindings not found by intellisense/autocomplete
Please excuse my rust newbiness. Any suggestions on getting autocomplete working in rls-vscode for generated bindings? I can see the various generated [feature name]_types.rs in my project’s folders under target/debug/build, and my code builds without complaint. But only non-generated types are shown in intellisense.
Since the godot-rust examples are tied to the project with relative path dependencies, I wasn’t sure of the preferred method of referencing feature dependencies. My toml dependencies are declared as…
[dependencies]
gdnative = "0.6.0"
gdnative-editor = "0.6.0"
gdnative-audio = "0.6.0"
...
And I’m referencing them as separate crates in my code…
extern crate gdnative;
extern crate gdnative_editor;
extern crate gdnative_audio;
...
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (8 by maintainers)
It seems like a few people have these issues at the moment, we’re also discussing them in our Discord. We had a similar, but not identical problem with CLion in https://github.com/godot-rust/godot-rust/issues/789.
I’m not using VSCode myself, but if someone has found a way to make the symbols work, would be appreciated to share them in #789 or the Discord!
By the way, I came back to see the intellij config and noticed that it’s suggested to apply a patch. That’s not necessary.
You can go to
help->Find Action->Experimental features...and activate the following features:org.rust.cargo.evaluate.build.scriptsorg.rust.cargo.fetch.out.dirNow intellisense should work for the generated files.
I think README is a good place for now. We’ll likely want to mention it in the book eventually as well, probably in the “getting started” guide.
With rust-analyzer the following settings will make it work:
These settings will work in vim with coc.nvim and vscode. It should be similar for other lsp clients.
To make it work in CLion/Intellij Idea:
idea.max.intellisense.filesize=999999Otherwise Idea skips bindings, as they are over the default limit of 2,56mb