Hooking into new file creation

I know we have daily and Zettelkasten prefixer settings, but I’d really like to make a plugin that’ll let you define a function that specifies the name of new note. I have a personal date-encoding that can’t be directly implemented with Moment formatting.

Is this even something we can hook into? I’ve had a skim of other plugins and most seem to be checking for Moment formatting, or none at all. I also read through the API, but I didn’t spot any events that looked likely to hook into.

Oh, just to say, I’m very comfortable with Typescript.

Answering my own question!

Based on the nuggets in API / callback for 'file-rename' event? - #4 by tgrosinger I found the hook (this.app.vault.on("create", () =>()))

Thanks y’all!

Looks like I was a little pre-emptive. The event fires after creation, and on load (where it’s adding all the items to the vault I presume). Updating the payload will actually affect the UI representation of the files, not how the file was saved (which seems to come earlier in the process).

Investigations continue.