I posted about my project below - https://github.com/0x007BA7/codebook
But maybe you should checkout the tools it’s based on, sem - https://github.com/Ataraxy-Labs/sem and ultimately treesitter. They at least give a more structured approach to dealing with code than simple text.
This is great stuff; I've been prototyping with a few language-specific parsers like the Golang and the polyglot approach looks really helpful for me