yea i tried to do this (somewhat successfully) with a custom editor for css https://github.com/feralsoft/charisma (demos on my old x https://x.com/charisma_css)
css is primed for this since you can write your rules in such a way that rule order doesn't matter, which means you really don't have to think about where your code it
in my dream world, i have very smart search (probably llms will help), i look at just the minimal amount of code (ideally on a canvas), edit it and remove it from my context
i don't care where or how the code is stored, let the editor figure it out and just give me really good search and debuggers