Closed mnsgs closed 6 months ago
This is a verbatim environment, if you don't want it to be verbatim then you can use
verbatimEnvironments:
lstlisting: 0
Thanks @cmhughes , latexindent --yaml="verbatimEnvironments:lstlisting: 0" test.tex
does not really solve the issue though - it yields the following
\documentclass{article}
\usepackage{listings}
\begin{document}
Listing test
\begin{lstlisting}
Important listing
\end{lstlisting}
Itemize test
\begin{itemize}
\item test item
\end{itemize}
\end{document}
hence idents also the content inside the environment.
I would consider it a bug that the \begin
and \end
are not aligned with the default settings?
Thanks for the follow up.
Verbatim blocks are deliberately left alone, this is not a bug.
Perhaps you might like noAdditionalIndent?
Thanks for clarifying
Please provide the following when posting an issue:
original .tex code
yaml settings
None
actual/given output
desired or expected output
anything else
Formatting applied using the logic
latexindent test.tex
I would expect
\end{lstlisting}
to be indented to the same level as of the\begin{lstlisting}
as is the case for theitemize
environment which is added for illustration purpose-- Context