nvim-neorg / neorg

Modernity meets insane extensibility. The future of organizing your life in Neovim.
GNU General Public License v3.0
6.08k stars 202 forks source link

fix(summary): ordering and indentation of nested entries #1486

Closed nuhakala closed 2 days ago

nuhakala commented 5 days ago

Current state sometimes mixes entries with nested categories. For example, if there is three items:

The produced summary looks like this:

* Index
** Cat
*** Sub
   - A
   - B
   - C

even though I want C to be directly under Cat. With multiple notes this causes nested categories to be rather messy sometimes.

I fixed this by simply introducing few temporary variables and adding nested categories to the summary at the end.

vhyrro commented 4 days ago

Code looks good! I'll also play around with the implementation later today to make sure it all works :)

vhyrro commented 2 days ago

Seems to work well for me, thanks for the PR!