hsz / idea-latex

LaTeX plugin for IntelliJ IDEA

Home Page:https://plugins.jetbrains.com/plugin/7660

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code folding happens where it is not needed

existme opened this issue · comments

commented

At several occasions I have a code that looks like this:

\subsection{title}
    \begin{itemize}
        \item item1
        \item item2
        \item \textbf{title} : content
        \item item4
        \item item5
     \end{itemize}

when you open a file containing a portion of text like above, it would be collapsed to something like this:

+  \subsection{title}                                        <-------+    Collapsed code
+    \begin{itemize}....  : content                          <-------+
          \item item4
          \item item5
     \end{itemize}

which is both unwanted and confusing.

collapsed-sample

Furthermore, how do I disable Latex code folding entirely?

commented

@existme did you find a solution to this issue? I've run into it as well and am considering fixing it by adding in the ability to disable folding entirely (a nuclear option, to be sure) per (@ianfp)'s comment.

commented

@justinlynn No. Unfortunately, I actually stopped documenting my stuff using Latex and switched to markdown because it's more portable.

commented

@existme That's unfortunate but understandable if it works better for you.

@ianfp More generally, I've forked the idea-latex source and added in an option to disable code folding for LaTeX documents in the usual place. I'm testing locally and will submit a PR shortly.

EDIT: This branch is at https://github.com/justinlynn/idea-latex/tree/upstream-feature/disable-code-folding-option until it's baked enough to PR.