epwalsh / obsidian.nvim

Obsidian 🤝 Neovim
Apache License 2.0
4.28k stars 195 forks source link

Daily note should use your template in .obsidian/daily-notes.json #12

Open CamdenClark opened 2 years ago

CamdenClark commented 2 years ago

🚀 The feature, motivation and pitch

If obsidian.nvim seeks to replicate the behavior of the existing obsidian core plugins, this would be a really nice feature to have.

ie:

{
  "folder": "Daily",
  "template": "Templates/Daily",
  "autorun": false
}

and use that template to generate as opposed to a mandated file.

Alternatives

Don't know of any alternatives other than editing the source, and might as well just edit it for everyone's support.

Additional context

No response

CamdenClark commented 2 years ago

I'd like to try to implement this, with your permission!

epwalsh commented 2 years ago

That would be awesome! Please do!

ajmasia commented 1 year ago

@CamdenClark did you implement it? :smile:

evtuhovich commented 1 year ago

@CamdenClark i'll implement this in a week, i hope.

But reading .obsidian/daily-notes.json is not a good idea, because it has strange date format (see https://momentjs.com/docs/#/displaying/format/). And reading and parsing the file just for one string - i don't want to do this.

But i can add template opt to daily_notes, and it will apply this template to new daily notes.

aaronmcadam commented 1 year ago

Any news on this one? I think it'd be a handy feature :)

evtuhovich commented 1 year ago

Sorry, I'm stil very busy. I'll try to fix it quickly, but it's not very easy task to apply templates. @CamdenClark may be you can?