Most language modes have a `foo-ts-mode` now that uses `tree-sitter` to get a perfect* AST in the absence of errors, and almost always the most reasonable one in the presence of errors. `tree-sitter` is amazing, a real feat.
It ships with 29 and it's work to find `brew` or `apt` or `nix` or anything giving you less than 29.1 these days.
Have you tried a recent version? 29.1 is dramatically more accurate on everything from syntax highlighting to indention than VSCode (IMHO, they're probably either using or working on using `tree-sitter` too, those are serious people) or JetBrains stuff (they're working on their vscode clone more than IntelliJ these days).
I only use `nvim` for commit messages and stuff the last few years, but AFAIK it has all the `tree-sitter` stuff too.
If it's the sloppy naming of `c-basic-offset-this` vs. `py-indent-that` or whatever (I don't even remember), try a good baseline distro like Doom and tweak from there.