2

I am using Clangd as LSP server.

"inlayHint.display": false and "clangd.arguments": ["--function-arg-placeholders=0"]" work to disable the placeholders in functions like print, but not in if, while, for, etc.

When auto completing it fills it with for (init-statement; condition; inc-expression) {}.

How can I disable that?

2
  • 1
    Vi and Vim may be a better place to ask questions about configuring vim. Commented Jul 1 at 15:12
  • @THEO_C you should consider switch to native lsp in case you want better lsp support, while the coc is a good ecosystem but it lacks the functionality of heavy customization, neovim/nvim-lspconfig Commented Sep 9 at 15:51

1 Answer 1

0

With clangd 21, you can use the newly added CodePatterns config option.

Example usage, in your project's .clangd file:

Completion:
  CodePatterns: None

Note that this will cause clangd to not send completion proposals for "code patterns" like if or while at all.

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.