\documentclass{article}
\usepackage{bidicode}
\usepackage{xepersian}
\settextfont{XB Niloofar}
\begin{document}
\begin{LTR}
\begin{lstlisting}[morekeywords=newglossaryentry,numbers=none,frame=none,backgroundcolor=\color{white}]
\newglossaryentry{electrolyte}{name=electrolyte,description={solution able to conduct electric current}}
\end{lstlisting}
\end{LTR}
\end{document}