by default rust-analyzer completes vec! with [], but other macros get completed with ().
i just wrote floop, which is closer to a match/loop than a function call so i prefer to call it with {}, but rust-analyzer keeps completing it with (),
is it possible to tell rust-analyzer to use {} instead?
the macro is a proc-macro, but i may end up wrapping it in a macro_rules at some point in the future (to reduce code duplication and possibly add dependencies).
I had an impression that it completes using brackets appearance from conext, so if it's a vector then '', if a function call, then '()', and if it's a block, then '{}'.
rust-analyzer scans the doc comment of the macro for invocations of its own name, so for a macro called vec, if the doc comment mentions vec![] rust-analyzer will autocomplete it with those delimiters
As @kpreid pointed out, we now also have a tool attribute
that explains why it wasn't being done automatically for my macro, my crate only has a single macro so the docs are crate-level and the macro docs are just /// see the [crate level docs](crate).