[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
tree: cb97aa1b6ae63b493737701a2cc39b1b4aa21be2
  1. fidl-lsp/
  2. fidldev/
  3. .gitignore
  4. AUTHORS
  5. CONTRIBUTING.md
  6. LICENSE
  7. PATENTS
  8. README.md
README.md

Fuchsia Open Source Template Repository

This repository is a template that we will use when creating new open source repositories for Fuchsia.