SebastianMC / obsidian-custom-sort

Take full control over the order and sorting of folders and notes in File Explorer in Obsidian
GNU General Public License v3.0
255 stars 19 forks source link

[Feature request] Possible to prioritize starred items? #45

Closed amatiasq closed 1 year ago

amatiasq commented 1 year ago

Starred core plugin allows to "star" a note.

I'm looking for a plugin that allows me to sort by > advanced created but placing starred notes first (a folder considered starred if a note inside is starred).

Would that be possible with this plugin?

SebastianMC commented 1 year ago

Hi @amatiasq

in result of your request I examined the construction of the core plugin 'starred'. It seems that integration is possible and the 'starred' plugin can be queried 'is the file ... starred?' Next step is a simple PoC to confirm the above finding

SebastianMC commented 1 year ago

Hi @amatiasq

the feature is available in the newest (1.5.0) release of the plugin.

There is a new keyword starred: and it can be used as in the below example to place the starred items in the top of File Explorer:

---
sorting-spec: |
  target-folder: /*
  > advanced created 
  starred:
---

This is a concise versions of the configuration. For a more verbose version with explanatory in-line comments please refer to the documentation of the plugin.

amatiasq commented 1 year ago

That's impressively fast! I've updated the plugin and works as expected.

Screenshot 2023-01-03 at 19 31 46

Thank you @SebastianMC 🧙