“Scientists have calculated that the chances of something so patently absurd actually existing are millions to one.
But magicians have calculated that million-to-one chances crop up nine times out of ten.”
(The author is left as an exercise for the reader)
Sure it's an intuitive way of representing your data. Is it the most appropriate though?
See an example [0] about using Projectional Editing in order to use mathematical notations for formulas.
You can (sort of) do all of that with the Eclipse Modeling Framework[0].
Your AST is what EMF calls a "model".
By default the "backend" and ecosystem surrounding EMF is skewed towards Java for historical reasons, but there have been some prototypes with other languages as well.
You can serialize your AST in any way you like, although by default it relies on XMI files. You can implement your own textual concrete syntax, or rely on a database.
The EMF ecosystem has tools for implementing textual or "graphical" concrete syntaxes. You can combine them (e.g. usually a specific subset of your AST gets edited in a certain way that's best for your targetted end users).
The ecosystem also has tools for performing comparisons and plugging them into your editing means.
Of course all of this tooling requires a lot more work than an LSP server.