\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}