[all-commits] [llvm/llvm-project] 3cb122: [clangd] Add `score` extension to workspace/symbol...

Sam McCall via All-commits all-commits at lists.llvm.org
Tue Oct 6 02:57:58 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3cb1220709fa556d4d29ce0e25fd30a16895ae24
      https://github.com/llvm/llvm-project/commit/3cb1220709fa556d4d29ce0e25fd30a16895ae24
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2020-10-06 (Tue, 06 Oct 2020)

  Changed paths:
    M clang-tools-extra/clangd/FindSymbols.cpp
    M clang-tools-extra/clangd/Protocol.cpp
    M clang-tools-extra/clangd/Protocol.h
    M clang-tools-extra/clangd/test/symbols.test

  Log Message:
  -----------
  [clangd] Add `score` extension to workspace/symbol response.

The protocol doesn't really incorporate ranking.
As with code completion, most clients respect what the server sends, but
VSCode re-ranks items, with predictable results.
See https://github.com/clangd/vscode-clangd/issues/81

There's no filterText field so we may be unable to construct a good workaround.
But expose the score so we may be able to do this on the client in future.

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




More information about the All-commits mailing list