question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Autocompletion does not work when files use include!

See original GitHub issue

I’m working with a very large code base that uses include! to break up modules that otherwise would be excessively large. We also use it to make sure our code is well organized, with a file-per-major item pattern (a struct, a pub fn, a pub type, that sort of thing). It make finding things a snap - find, TextMate cmd-T, etc. And it works with intellij-rust too - Cmd-N is wonderful.

What doesn’t work is autocompletion. Autocompletion works perfectly for things in the stdlib. And within a file referencing other items. But not across files. Likewise, find usages does not work, either, and we’re not confident refactor change name will. For us, this is a major reason to use an IDE.

(We realise we’re not doing things “The Rust Way”, but the “Rust Way” for modules doesn’t scale. It’s an anti pattern. It’s more code, and it creates more collisions that need not occur when many developers are at work on a code base. And the the file system does not represent the contents. A million and one mod X / pub use X aren’t appropriate, along with all the duplicated use X statements that creates).

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

6reactions
Ekranoscommented, Mar 22, 2018

Is there any update on this? Since I got the same problem and this issue is open since Nov 2016.

Also I have to agree that the Rust module way just doesn’t really scale. I am working on a project with ~150 structs in one module (and yes, they belong this tightly together…) and it would be a blessing to be able to split them into multiple files while retaining autocomplete.

And including generated bindings which get completed would be really great too.

1reaction
raphaelcohncommented, Jul 1, 2019

Now works! Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

include autocompletion does not work properly when ...
Open a C/C++ project. Ensure that Tools > Options > Text Editor > C/C++ > General > Automatic Brace Completion is unchecked. Type...
Read more >
Why Auto-Completion doesn't work in newly created protocol ...
I think the problem is that the compiler will not scan the file unless it is imported into a file that is scanned....
Read more >
AutoComplete not working correctly - Outlook - Microsoft Learn
Start Outlook. Select File > Info > Account Settings. An Account Settings window will open, if it says Microsoft Exchange (under Type), use ......
Read more >
Include Autocomplete - Package Control
This plugin will try to autocomplete file names for #include "" directives in C files. By default it will (recursively) look in the...
Read more >
Is Xcode autocomplete not supposed… - Apple Developer
Is Xcode autocomplete not supposed to work in standalone c++ header files? ... but it seems that the header file is only indexed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found