[Clangd] Make the type hint length limit configurable
authorzhangyi1357 <zhangyi_1357@sjtu.edu.cn>
Thu, 20 Apr 2023 10:13:44 +0000 (12:13 +0200)
committerHaojian Wu <hokein.wu@gmail.com>
Thu, 20 Apr 2023 13:21:48 +0000 (15:21 +0200)
commit2ae1aa9da7882f9a0707c4cea8d76bced44dd7fb
tree87e5b88e872633dc74a74aa51d1a26ab4da02fe1
parentea60ffc6d156e5205324349dc520f59fe7500714
[Clangd] Make the type hint length limit configurable

This commit is about clangd's type name hint length limit. The past behavior was 32 characters fixed limit. It is now configurable.

Projects can now add the following config fragment to their .clangd:

```
InlayHints:
  TypeNameLimit: 34
```

Ref: [[ https://github.com/clangd/clangd/issues/1357  | Make the type hint length limit configurable ]]

Reviewed By: hokein

Differential Revision: https://reviews.llvm.org/D147395
clang-tools-extra/clangd/Config.h
clang-tools-extra/clangd/ConfigCompile.cpp
clang-tools-extra/clangd/ConfigFragment.h
clang-tools-extra/clangd/ConfigYAML.cpp
clang-tools-extra/clangd/InlayHints.cpp
clang-tools-extra/clangd/unittests/InlayHintTests.cpp