liamcain / obsidian-creases

👕 Tools for effectively folding markdown sections in Obsidian
MIT License
228 stars 8 forks source link

Folded by default working? #17

Closed cansar closed 2 years ago

cansar commented 2 years ago

Sorry for the dumb question but I can’t get folded by default to work and given that the plug-in is quite new I’m not sure if this is a known issue (everything else works great). I have a crease in a section of my daily template and creating the note via the calendar plugin creates a new crease but it’s not folded.

liamcain commented 2 years ago

The folding sections by default currently only works with Templater. But if you want that behavior with the Calendar plugin, you can just open up your daily note template and fold those sections in the template. The calendar plugin automatically copies folds from the template file.

cansar commented 2 years ago

Ah, I see, that makes sense. And "Trigger Template on Note Creation" isn't enough in this case?

I've experimented with keeping the template file folded but it stops working eventually because the fold doesn't stay there permanently (potentially due to folds not syncing, I'm not 100% sure why).

liamcain commented 2 years ago

I've experimented with keeping the template file folded but it stops working eventually because the fold doesn't stay there permanently (potentially due to folds not syncing, I'm not 100% sure why).

You mean that the folds in your template file are disappearing? If you're using Obsidian sync, I know that folds don't sync between devices so that might be the issue.

And "Trigger Template on Note Creation" isn't enough in this case?

I will make a change to templater to support this case. Currently the templater support is limited to when you use the command "Templater: create new note from template" but I can fix that. Thanks for bringing this up!

cansar commented 2 years ago

Yes, that’s what I meant. Thank you for looking into this! As an alternative the FR for having sections always folded on load would handle this use case too.

liamcain commented 2 years ago

This should be fixed now with creases v0.6.0. Feel free to reopen if you're still having issues with it!