1

My project level settings.json is like following:

    "C_Cpp.intelliSenseEngine": "disabled",
    "C_Cpp.formatting": "clangFormat",
    "C_Cpp.clang_format_style": "file",
    "C_Cpp.clang_format_fallbackStyle": "Microsoft",
    "C_Cpp.clang_format_path": "<path to `clang-format` binary>",
    "clangd.path": "<path to `clangd` binary>",
    "clangd.arguments": [
        "-log=verbose", 
        "-pretty", 
        "--background-index", 
        "--background-index-priority=low",
        "--clang-tidy",
        "--enable-config",
    ],

In the .clangd file at project level, I have added followings:

InlayHints:
  Enabled: Yes
  BlockEnd: No
  Designators: No
  ParameterNames: Yes
  DeducedTypes: Yes
  TypeNameLimit: 0

However, I am still getting inlay hints at block end for C++ files. What am I missing?

I am using VS Code from windows with remote connection. I have clangd extension installed and clangd version in remote machine is 19.1.0

3
  • 1
    I don't see anything obviously wrong with your setup. I would encourage you to file an issue at github.com/clangd/clangd/issues with added details (e.g. example code, clangd logs) for further diagnosis. Commented Dec 6, 2024 at 0:26
  • Sure - I'll file one. Commented Dec 6, 2024 at 0:59
  • 1
    @HighCommander4 - resolved through suggestion in the github issue (github.com/clangd/clangd/issues/2250). Commented Dec 12, 2024 at 6:55

1 Answer 1

0

Resolved the issue as per suggestions in the github issue. User config takes precedence over the project config. When I was setting up VS Code initially, a user config got created. I had to delete the user config to resolve it (could have removed the project config as well).

On Linux, the user config was under ${HOME}/.config/clangd/config.yaml

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.