That's easy. Go to:
Settings > Files & Links > Default location for new notes: Same folder as current file
Note that the file explorer is a plugin like any other, so you can also create your own file explorer plugin that works the way you want it to :)