Implement workspace/symbol
commit0fccc2597ab5c3ea1c6afaf03e92725f64f5631a
authorLucian Wischik <ljw@fb.com>
Sat, 1 Apr 2017 00:14:24 +0000 (31 17:14 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Sat, 1 Apr 2017 00:29:28 +0000 (31 17:29 -0700)
treed411f1ba97e6560e39078e4da2eea5fee0d473e1
parent00a1c75d1d49eee723ec1725ee67d6d81ac5396d
Implement workspace/symbol

Summary:
This implements the "workspace/symbol" project-wide symbol search.

Nuclide has traditionally invited you to specify an optional filter type (function, method, ...) but LSP doesn't have that. Few people are using it. We've decided to not implement it.

Nuclide has traditionally picked different icons for the various symbol kinds it might return. We're still doing that, but the set of symbol kinds in Hack is marginally different from what's in LSP. So: we'll map "trait" to interface (since the Hack docs explain that a trait is an interface with implemtation), and we'll map "typedef" to class.

Actually, I think it'd be better for us to dig into typedef to see what kind of type we're typedefing. But that can be left for a future day.

Reviewed By: arxanas

Differential Revision: D4772005

fbshipit-source-id: ac025a6e4bf96f7ba32fd1eb8389b75d6591e106
hphp/hack/src/client/clientLsp.ml
hphp/hack/src/ide_rpc/lsp.ml
hphp/hack/src/ide_rpc/lsp_fmt.ml
hphp/hack/src/search/hackSearchService.ml