But... Don't they already do that? I am a daily vim user and there is a million plugins that were created using those "hooks" you talk about. I guess that's the case with emacs too.
Just two days ago I jumped into a huge bazel project and needed a good way to navigate through 100s of files that are connected through @funny//labels/across/directories/and.files. By only reading vim's :help, I was able to write that 10lines of code which hooks into the existing "go-to-file" or "find-where-this-is-defined" functionality.
(In fact, after "implementing" this feature, I was wondering how I'd do this as a user (not as a plug in author) in any other editors.)
It was borne specifically out of my difficulty extending Vim to do what I was after when working with PHP frameworks!
Basically, I'd like the editor to understand the AST of the language(s, including mixed-language files, which is really hard) and be able to hook into parts of that AST to say "while this is a string, it's really this weird DSL that hooks into Javascript, so look for symbols here, here and here".
Its definitely possible to make Vim, Emacs and TA work this way, but its a lot more work than I had in mind, when I tried to extend them (well, not Emacs. It might be best at this, I'm just not a good emacs user) to achieve what I was after at the time, which was understanding the dependency injection annotation patterns from Symfony in PHP.
I think one could get pretty close with LSPs and the powerful AST parsers we have nowadays. Though doing it fast might be difficult!
I use the lite-xl fork https://lite-xl.com/
Neovim?
Sounds like emacs in text mode
This is something I've wanted back when I was doing professional PHP development, when life was still in black and white. I still reckon it would be useful today.
I started to build exactly that myself, in Nim, but got distracted building the editor itself and eventually moved on to other personal projects. Maybe I should revisit it.
An example, based on the current HN home page, would be htmx integration in HTML editing, that is aware of the rest of your project and how htmx works to give excellent, powerful autocomplete within your bindings. Maybe even have it be able to be aware of the backends route set!