nvim-neorg / norg-specs

A collection of specifications and grammars for Neorg's file format, `norg`.
88 stars 18 forks source link

[Suggestion]: syntax for quantity in detached modifer extensions #41

Open youngnix opened 1 month ago

youngnix commented 1 month ago

Sometimes, you want to specify an amount of times something needs to be repeated. For example, if you're not sedentary like me, you might want to track your exercise routine. In that case, you might be tempted to specify you have to do 5 pushups. - 5 x pushups is valid, and is alright for most cases. But considering that Norg has dedicated syntax for a date extension, I believe something similar but for quantity could be implemented. I suggest the following syntax: - (* 5) Push-ups. All you need to do is - (* number[unit]?) Examples:

* Shopping
- (* 2Kg) Rice
- (* 24) Eggs
- (* 2l) Milk  
mrossinek commented 1 month ago

I like this general idea :+1: Might need some fleshing out of details but we should keep this in mind while we are implementing all the other recently proposed changes.

Especially with the potential clash of the * character proposed here: https://github.com/nvim-neorg/norg-specs/issues/38#issuecomment-2241665836