From bf7ecc9ab1a2b5cfb213c6024f2f907b4681e6d8 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 9 Oct 2019 09:16:14 -0700 Subject: [PATCH] Customization: mention completion.placeholder --- Customization.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Customization.md b/Customization.md index 7938ca6..2d820cf 100644 --- a/Customization.md +++ b/Customization.md @@ -149,15 +149,20 @@ Use the path provided as the Clang resource directory rather the default. See information. #### `client.snippetSupport` +#### `completion.placeholder` -Default: `true` +`client.snippetSupport` (default: `true`) and `completion.placeholder` (default: `true`) +decide the completion style. -LSP snippets in completion items are enabled if this option is true and the -client announces that it supports it -(`capabilities.textDocument.completionItem.snippetSupport`). If your client -supports LSP snippets but you don't like them, set the option to `false`. +* client.snippetSupport: false => `foo` +* client.snippetSupport: true + + completion.placeholder: false => `foo($1)$0` `bar<$1>()$0` + + completion.placeholder: true => `foo(${1:int a}, ${2:int b})$0` `bar<${1:typename T}>()$0` -Example: `{"client": {"snippetSupport": false}}` +If the client announces that it does not support snippets, +`client.snippetSupport` will be forced to false. + +Example: `{"client": {"snippetSupport": true}, "completion": {"placeholder": false}}` #### `compilationDatabaseDirectory`