aerial.nvim
aerial.nvim copied to clipboard
LaTeX
Language: LaTeX
I read a bit about the symbolKind
documentation but I really couldn't make out anything significant of it.
LaTeX is a typesetting language, so the implementation should be similar to Markdown's one.
It also allows for function definition, figures, tables, etc, but to at least being able to navigate smoothly between section
s it would be really nice
This is doable (though I probably can't get to it for a few weeks). Could you provide a minimal sample of some of the constructs that you would expect to show up in the symbol view? Ideally something like the existing test files.
Hey, no problem. I looked into the Markdown file. If I guess correctly from what I read, the construct
# Title 1
is mapped to Interface
.
LaTeX in that sense is similar: using as example a template for a document, it would be typesetted as:
\documentclass{article}
\usepackage{amsmath, color}
\newcommand*{\abs}[1]{\left|#1\right|}
\title{Lorem Ipsum}
\author{John Doe}
\date{01/01/1970}
\begin{document}
\maketitle
\newpage
\section{First section}
This is a section.
\subsection{A subsection}
This is a subsection.
\section{This is another subsection}
\end{document}
You can see that structurally, it has a lot of similarities with HTML.
After declaring the document class (<!DOCTYPE html>
), you have a section for setupping (<head></head>
) which can also have importing via the usepackage
function and declaring user-defined command (this may be marked as a function symbol at the top of aerial
tree).
After that you have the beginning of the document (<body></body>
) that can be subdivided in sections just like on Markdown with up to three levels of nesting (subsubsection
).
Right now the only plugin I know that correctly does this functionality for LaTeX is vimtex
, which is actually pretty good, but it's too monolithic and doesn't use treesitter
.
Awesome, thanks for the sample! I'm going off grid for about a week, but I'll pick this up as soon as I'm able.
Yea no rush, I'm also full with studies. Thanks for your time and the awesome plugin :D
Apologies for the long silence; I usually use my email inbox as a todo list so I don't lose track of items, but somehow this one slipped away from me. I've added some basic latex symbols in treesitter. Give it a spin and please file follow up issues for any structures missing
Thanks! I'll open another issue if I see any problems