[clangd] Implement proximity path boosting for Dex
authorKirill Bobyrev <kbobyrev.opensource@gmail.com>
Thu, 6 Sep 2018 12:54:43 +0000 (12:54 +0000)
committerKirill Bobyrev <kbobyrev.opensource@gmail.com>
Thu, 6 Sep 2018 12:54:43 +0000 (12:54 +0000)
commit19a9461e5fc012f58741888243fd6497ebffa6ff
tree7b86be5bdd80408feff684482ebae63647695bb1
parentac6595bd53caf5394a7d14c04ae86837ef823eb9
[clangd] Implement proximity path boosting for Dex

This patch introduces `PathURI` Search Token kind and utilizes it to
uprank symbols which are defined in files with small distance to the
directory where the fuzzy find request is coming from (e.g. files user
is editing).

Reviewed By: ioeric

Reviewers: ioeric, sammccall

Differential Revision: https://reviews.llvm.org/D51481

llvm-svn: 341542
clang-tools-extra/clangd/FileDistance.h
clang-tools-extra/clangd/URI.cpp
clang-tools-extra/clangd/URI.h
clang-tools-extra/clangd/index/SymbolYAML.cpp
clang-tools-extra/clangd/index/SymbolYAML.h
clang-tools-extra/clangd/index/dex/DexIndex.cpp
clang-tools-extra/clangd/index/dex/DexIndex.h
clang-tools-extra/clangd/index/dex/Token.h
clang-tools-extra/clangd/tool/ClangdMain.cpp
clang-tools-extra/unittests/clangd/DexIndexTests.cpp