How do i tell rust-analyzer what kind of bracket to use for a macro?

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).

add an example snippet in the doc comment, rust-analyzer will try to pick the bracket in the example.

There is also a configuration attribute for it.

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 '{}'.

There are two things at play here:

  1. 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
  2. As @kpreid pointed out, we now also have a tool attribute

The latter takes priority

it worked :D, thanks a lot.

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).

i think i can only mark one answer as the solution so i'll use this one as it summarizes the 2 solutions and explains their ordering/priority.