Use VS Code (or Codium as open source alternative) and install the plugin YAML from RedHat. Though it doesn't allow to edit YAML as key-value data tree, it has a lot of advantages when it comes to editing YAML.
It "Provides comprehensive YAML Language support to Visual Studio Code, via the yaml-language-server, with built-in Kubernetes syntax support."
Detects whether the entire file is valid yaml
Detects errors such as:
Node is not found
Node has an invalid key node type
Node has an invalid type
Node is not a valid child node
Document Outlining (Ctrl + Shift + O):
Provides the document outlining of all completed nodes in the file
Auto completion (Ctrl + Space):
Auto completes on all commands
Scalar nodes autocomplete to schema's defaults if they exist
Hovering over a node shows description if provided by schema
Allows for formatting the current file
On type formatting auto indent for array items