[lsp] textDocument.hover
This adds the "textDocument/hover" capability to the language server.
The functionality is split into three main steps:
* in compile.go, when a library is imported, Analyzer.genSymbolMap
builds a map of fully-qualified symbol names to their type
information (types defined in symbol.go).
* when the server receives a `hover` request, it calls
Analyzer.TypeOfSymbol (in type.go), which looks up the symbol's type
information in the symbol map for its library.
* the LangHandler converts that type information to a human-readable
tooltip in symbolTypeToMarkedStrings (hover.go).
Test: go test ./...
Change-Id: I8619d125383688f4438ccce06b83414480d4874f
Reviewed-on: https://fuchsia-review.googlesource.com/c/fidl-misc/+/395996
Reviewed-by: Benjamin Prosnitz <bprosnitz@google.com>
Reviewed-by: Pascal Perez <pascallouis@google.com>
8 files changed