codeintel: add explicit support for MarkupContent in lsif/protocol & optimize hover ingestion
Created by: Strum355
This PR looks like it does a lot more than it actually does. Its mostly a minor reorganization, allowing for a nicer unmarshalling into either a MarkedString
or MarkupContent
(sum types when
As part of the reorganization, it has been made (almost) possible for lsif-go to also adopt MarkupContent
instead, by changing hoverResult
to take an fmt.Stringer
and making the three types implement it (sum types/sealed types when MarkedStrings
, we can change that too in this PR if so desired.
There are ramifications of course, if someone uses an indexer that emits MarkupContent
but is on an older sourcegraph instance that was not MarkupContent
aware. Im not sure how we can tackle that without never being able to move indexers away from MarkedString
.
Note: this is a first draft and is a bit rough on the eyes in certain areas. Ill revisit again tomorrow to slap some makeup on it