\documentclass{article}
\usepackage{minted}
\usepackage{listings}
\begin{document}

\begin{listing}
	\label{figure:parallel}
	\caption{Computing the average sentiment of tweets related to COVID-19 in parallel in Akka Streams.}
	\begin{minted}{scala}
foobar
	\end{minted}
\end{listing}

\end{document}