This can only work if the editor internalizes the corresponding language. That does not scale for all languages available.
That’s exactly what the language server protocol is all about (and certainly what parsers like tree sitter are there for). Emacs can connect to those and acquire semantic analysis capabilities. The degree to which such a semantic language features will work for you will also depend strongly on the language, of course.
If you use a commercial editor it’ll jump start you for the popular languages. But, say, you wanted to program in Raku or Scheme you’ll also going to need to fiddle around.
So the Raku server has a deficiency, currently. Too bad. But in Emacs you can work around that by writing into your config file:
(remove-hook 'xref-backend-functions #'lsp--xref-backend t)
if you use "lsp-mode.el" or equivalently (remove-hook 'xref-backend-functions 'eglot-xref-backend t)
if you happen to use "eglot.el". (There are two major language server clients available for Emacs.)This will not turn off "finding references" completely because Emacs happens to have a default backend called "etags-xref-backend" based on a reverse index file. You can easily generate that in your project directory using a shell tool shipped with Emacs or even execute that automatically from inside a git commit hook. So Emacs can stand in until Raku's language server is fixed.
So ... while you would be in trouble with a commercial editor now, you can continue hacking happily thanks to Emacs' flexibility.