nvim-neorg / neorg

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

fix: insert template at the end of a new note #1468

Closed Dynge closed 3 months ago

Dynge commented 3 months ago

I noticed this small bug as I've begun using journal entries in my notes.

I believe the problem occurs because I've set metagen.type = "auto".

This fixes a bug where metadata is injected into the newly created file before the template contents. Which results in the template content being placed above the metadata.

By changing the 0 to a $ we always insert the template at the end of the file. I believe this is safe as this only occurs on newly created journal entries, which should therefore always be empty (except for some possible metadata injected by metagen).

vhyrro commented 3 months ago

Looks good to me! Can't think of a place where this would break either.