Lua based API that works with `silent`

Working on updating some plugins I maintain and had a user ask if they could silent any notifications that get printed to the message area, ala silent

Figured they could run silent Cmd, but that doesn’t seem to work with nvim_out_write or vim.notify or nvim_echo.

Is there any tips for this? Aside from having people override the function itself, it would be great if notify/echo “just worked” with built-in stuff like that.

When defining the command, <mods> expands to any leading modifiers such as silent (see :help :command-modifiers). You could plumb this through into your logic.