Is you wish programmability in your notes system, you should consider Trilium notes[0]. It is FOSS, pretty fast(even though it is electron-based), has pretty good feature-set and is very programmable(no mobile app, though, but self-hosted web version isn't that bad).
[0] https://github.com/zadam/trilium