You might take a look at Obsidian. For me it’s the best of two (or how many you like) worlds. You can sync your files via git or a cloud service of your liking. What bugs me is that it’s not open source but what makes it great is a lot of open source developers contributing plugins and themes.