It's currently hitting the standard list-like environments and comments but I can't quite figure when exactly it happens, as it looks non-deterministic: sometimes in a big document I actually get a reasonable 2-space indentation inside those environments. Currently, this is what I get when I start a new document:
\documentclass{article} \begin{document} \section{Introduction} \begin{enumerate} \item asdasdsadsad asdasdsadsad asdasdsadsad asdasdsadsad asdsa asdasd asadasdsadas asdasdsaasdasdsadsad asdasdsadsad asd asd asd asdasdsad \end{enumerate} \begin{itemize} \item asdsdas asdsdas asdsdas asdsdas asdsdas asdsdas asd asd asdasdsa \end{itemize} \end{document} So, when I insert an environment using yas-insert-snippet. I enter the name of the environment, hit Tab, and I start an \item, write a text till the end of line as set by fill-column and the text auto-wraps (as it should), but it also auto-indents with 8 spaces. This makes it completely unusable on narrow screens!
I tried explicitly calling LaTeX-fill-environment, and it does something similarly bad but a little different, so for the enumerate from the example above is does:
\begin{enumerate} \item asdasdsadsad asdasdsadsad asdasdsadsad asdasdsadsad asdsa asdasd asadasdsadas asdasdsaasdasdsadsad asdasdsadsad asd asd asd asdasdsad \end{enumerate} So, still 8 spaces but starting from the second line of an item.
I checked related variables that I know of (most likely, there are others), they're pretty much the reasonable defaults that make perfect sense:
LaTeX-item-indentvalue is0LaTeX-indent-levelvalue is2
I'm using Doom Emacs and my Doom config: https://github.com/ulysses4ever/dotfiles/tree/main/doom.d It's very minimally tuned from the default one. I use Emacs 29.0.92 (pgtk edition).