brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 612434b Raw
41 lines · c
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-exception6//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_H16#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INLAYHINTS_H17 18#include "Protocol.h"19#include <vector>20 21namespace clang {22namespace clangd {23class ParsedAST;24 25struct InlayHintOptions {26  // Minimum height of a code block in lines for a BlockEnd hint to be shown27  // Includes the lines containing the braces28  int HintMinLineLimit = 10;29};30 31/// Compute and return inlay hints for a file.32/// If RestrictRange is set, return only hints whose location is in that range.33std::vector<InlayHint> inlayHints(ParsedAST &AST,34                                  std::optional<Range> RestrictRange,35                                  InlayHintOptions HintOptions = {});36 37} // namespace clangd38} // namespace clang39 40#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INLAYHINTS_H41