Skip to content

Commit e8ff032

Browse files
author
toasteater
authored
Merge pull request #18 from druerridge/intellij-autocomplete
Adding FAQ to enable autocomplete in IntelliJ-Rust
2 parents f7ffeb4 + d65dc1d commit e8ff032

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/faq.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,21 @@ impl AnotherNativeScript {
141141
People [reported](https://github.com/rust-analyzer/rust-analyzer/issues/5040) similar issues and found that switching on the `"rust-analyzer.cargo.loadOutDirsFromCheck": true` setting fixed it:
142142

143143
![completion](images/completion.png)
144+
145+
146+
## Auto-completion with IntelliJ Rust Plugin
147+
148+
**Question**
149+
150+
Similar to rust-analyzer, IntelliJ-Family IDEs struggle to autocomplete gdnative types generated at compile-time.
151+
152+
**Answer**
153+
154+
There are two problems preventing autocompletion of gdnative types in IntelliJ-Rust.
155+
156+
First, the features necessary are (as of writing) considered experimental and must be enabled. Press `shift` twice to open the find all dialog and type `Experimental features...` and click the checkbox for `org.rust.cargo.evaluate.build.scripts`. Note that `org.rust.cargo.fetch.out.dir` will also work, but is known to be less performant and may be phased out.
157+
158+
Second, the bindings files generated (~8mb) are above the 2mb limit for files to be processed. As [reported](https://github.com/intellij-rust/intellij-rust/issues/6571#) you can increase the limit with the steps below.
159+
* open custom VM options dialog (`Help` | `Find Action` and type `Edit Custom VM Options`)
160+
* add `-Didea.max.intellisense.filesize=limitValue` line where `limitValue` is desired limit in KB, for example, 10240. Note, it cannot be more than 20 MB.
161+
* restart IDE

0 commit comments

Comments
 (0)