xref: /llvm-project/clang-tools-extra/clangd/InlayHints.h (revision 1da3a795fcf61a2c931d9320738db7d5c0444ce2)
1 //===--- InlayHints.h --------------------------------------------*- C++-*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Support for the proposed "inlay hints" LSP feature.
10 // The version currently implemented is the one proposed here:
11 // https://github.com/microsoft/vscode-languageserver-node/pull/609/.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INLAYHINTS_H
16 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INLAYHINTS_H
17 
18 #include "Protocol.h"
19 #include <vector>
20 
21 namespace clang {
22 namespace clangd {
23 class ParsedAST;
24 
25 /// Compute and return inlay hints for a file.
26 /// If RestrictRange is set, return only hints whose location is in that range.
27 std::vector<InlayHint> inlayHints(ParsedAST &AST,
28                                   std::optional<Range> RestrictRange);
29 
30 } // namespace clangd
31 } // namespace clang
32 
33 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INLAYHINTS_H
34