NotesCmdr let's you format text with slash commands & markdown, use templates and do math in Apple Notes.
To get around the lack of a plugin system, I'm using the macOS accessibility API and AppleScript (through osascript) to interface with Notes. Took some finessing to make it feel native, but I'm pretty happy with the result.