Hannah-Sten / TeXiFy-IDEA

LaTeX support for the IntelliJ platform by JetBrains.
https://hannah-sten.github.io/TeXiFy-IDEA
MIT License
884 stars 87 forks source link

Embed Labels in Structure Tree #3662

Open jojo2357 opened 2 days ago

jojo2357 commented 2 days ago
\documentclass[12pt]{article}

\begin{document}
    \section{Part 1}
    \subsection{Part A}
            \begin{figure}
                \centering
                \label{figure}
            \end{figure}
    \subsection{The Next Part}
\end{document}

This gives the following tree for the file structure: image

I think it could be useful for the label figure to be nested in the tree one level deep under 1.1 rather than appended at the end. I understand they are currently grouped together. I think that an option is in order.

PHPirates commented 1 day ago

Looking at a structure view for Kotlin as example, it looks like all structure view items should appear in the same order as they are in the source file, so indeed figure should be after part A by default (unless they are sorted otherwise)