Is it possible to use neovim as a bat alternative?

There’s a tool called bat that render the code in the terminal, it’s useful in ranger, etc. However it doesn’t recognize all filetypes I need and I don’t want to configure another tool with everything I already have in neovim. Given that neovim has syntaxhighlight already, is it possible to replace bat with neovim? If so, how can I achieve that? Thanks!