From 0e22c9f275a4b99b799ec3bbaa379c9dfe91e49c Mon Sep 17 00:00:00 2001 From: Peter Tripp Date: Wed, 16 Oct 2024 16:07:05 -0400 Subject: [PATCH] docs: Add C++ clangd example arguments (#19308) --- docs/src/languages/cpp.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/src/languages/cpp.md b/docs/src/languages/cpp.md index 127330dd940dc56b7d20f6e0fcfe133823b7945c..dac1f210d48c29ca32d7d45fc171c1a1a556f808 100644 --- a/docs/src/languages/cpp.md +++ b/docs/src/languages/cpp.md @@ -38,6 +38,23 @@ If you want to disable Zed looking for a `clangd` binary, you can set `ignore_sy } ``` +## Arguments + +You can pass any number of arguments to clangd. To see a full set of available options, run `clangd --help` from the command line. For example with `--function-arg-placeholders=0` completions contain only parentheses for function calls, while the default (`--function-arg-placeholders=1`) completions also contain placeholders for method parameters. + +```json +{ + "lsp": { + "clangd": { + "binary": { + "path": "/path/to/clangd", + "arguments": ["--function-arg-placeholders=0"] + } + } + } +} +``` + ## More server configuration In the root of your project, it is generally common to create a `.clangd` file to set extra configuration.