Is it possible to configure lstlisting such that it doesn't break lines at certain characters? In this example, a line break is inserted after the opening parenthesis:
public void someMethod(
String parameter)
Instead, I would like the opening parenthesis to appear in the second line:
public void someMethod
(String parameter)
Edit (MWE added):
\documentclass{article}
\usepackage{listings}
\begin{document}
\begin{lstlisting}[breaklines=true, linewidth=5cm, frame=single]
public void someMethod(String parameter)
\end{lstlisting}
\end{document}

\documentclass{...}and ending with\end{document}– jub0bs Mar 03 '14 at 17:26listingspackage can perform some automatic code formatting; however, that feature is relatively limited and only documented in the developer's guide, at the moment. – jub0bs Mar 03 '14 at 17:29dand the(. – karlkoeller Mar 03 '14 at 18:39lstlistingenvironments as opposed to listings inserted with\lstinputlisting), it's easier to simply follow karlkoeller's advice: introduce some spaces in order to allow for a line break where desired. – jub0bs Mar 03 '14 at 19:07