In Vim/Neovim, running :normal gg=G will reindent your current file depending on its filetype.

If you have vim-pandoc and vim-pandoc-syntax installed, calling :normal gg=G will in return call:

$ pandoc -t markdown --reference-links

It will:

If you want to alter this behavior, you just need to add the following to your .vimrc:

let g:pandoc#formatting#equalprg = "pandoc -t markdown --no-wrap --atx-headers"

With the following, you'll keep your inline links, won't wrap the lines and use Atx-style headers

A lot of other options are available to suit your needs, feel free to take a look at the full documentation.