[all-commits] [llvm/llvm-project] 7c19fd: [clangd] Polish clangd/inlayHints and expose them ...

Sam McCall via All-commits all-commits at lists.llvm.org
Fri Jan 7 06:12:58 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7c19fdd59939249c23384f0900d49aab4a5f0695
      https://github.com/llvm/llvm-project/commit/7c19fdd59939249c23384f0900d49aab4a5f0695
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2022-01-07 (Fri, 07 Jan 2022)

  Changed paths:
    M clang-tools-extra/clangd/ClangdLSPServer.cpp
    M clang-tools-extra/clangd/ClangdLSPServer.h
    M clang-tools-extra/clangd/ClangdServer.cpp
    M clang-tools-extra/clangd/ClangdServer.h
    M clang-tools-extra/clangd/InlayHints.cpp
    M clang-tools-extra/clangd/InlayHints.h
    M clang-tools-extra/clangd/Protocol.cpp
    M clang-tools-extra/clangd/Protocol.h
    M clang-tools-extra/clangd/test/initialize-params.test
    A clang-tools-extra/clangd/test/inlayHints.test
    M clang-tools-extra/clangd/tool/ClangdMain.cpp
    M clang-tools-extra/clangd/unittests/InlayHintTests.cpp

  Log Message:
  -----------
  [clangd] Polish clangd/inlayHints and expose them by default.

This means it's a "real feature" in clangd 14, albeit one that requires special
client support.

- remove "preview" from the flag description
- expose the `clangdInlayHints` capability by default
- provide `position` as well as `range`
- support `InlayHintsParams.range` to restrict the range retrieved
- inlay hint list is in document order (sorted by position)

Still to come: control feature via config rather than flag.

Fixes https://github.com/clangd/clangd/issues/313
Protocol doc is in https://github.com/llvm/clangd-www/pull/56/files

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




More information about the All-commits mailing list