intellij-rust: Autocomplete doesn't work inside all macros
From @KadoBOT on August 9, 2018 5:50
I’ll use Nickel middleware!
macro as example:
middleware!(
// Autocomplete doesn't work inside here. Ctrl + Space shows "No suggestions".
)
Using brackets makes no difference. It doesn’t work either:
middleware!{
// Autocomplete doesn't work inside here. Ctrl + Space shows "No suggestions".
}
Copied from original issue: intellij-rust/intellij-rust.github.io#61
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 17
- Comments: 19 (9 by maintainers)
Personnally, I’d like the IDE to simply fallback to ignoring the macro if it can’t expand it and allow me to use autocomplete as if the code wasn’t inside a macro at all… For instance, the code inside a
stream!
macro (from the async_stream crate) can get pretty long and it becomes annoying real fast.It’s much harder for me to give an example when it doesn’t work =D In declarative macro invocations, an advanced code completion should work if a macro can be expanded. If a macro invocation can’t be expanded (in incomplete code), some simplified version is used when we just look at fragment specifiers (like
$foo:expr
) to decide what should be completed.Regarding the std, code completion should work for
thread_local
macro for example.Btw with the new expansion engine (#3628) code completion inside declarative macro invocations works in some cases (See
RsFullMacroArgumentCompletionProvider
andRsPartialMacroArgumentCompletionProvider
)It is. Just stumbled upon it.
@KadoBOT yeah, currently we don’t provide any completion inside macro invocation