Like it or not YAML configuration files are everywhere. I've had a lot of luck using JSON Schema with YAML config files. Luckily VSCdoe and possibly many other editors can be configured to provide type hints for completion. Using any available JSONSchema checker you can validate your config files in CI and elsewhere.

Most of the time, what's missing an accurate JSON Schema for a configuration. I usually encourage owners of those configurations to sit down and write it for everyone to benefit from

YAML allows comments, I'll give it that. But what I really want is splitting configuration into multiple files that can be imported to others. And substitutions. Basically HOCON known on the JVM as https://github.com/lightbend/config