[PATCH] D55994: [clangd] Check preceding char when completion triggers on ':' or '>'
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 3 01:16:42 PST 2019
hokein added a comment.
In D55994#1343669 <https://reviews.llvm.org/D55994#1343669>, @jkorous wrote:
> This looks like a work around LSP imperfection indeed.
>
> Are you going to push for change in LSP? Something like `CompletionOptions/triggerCharacters` -> `CompletionOptions/triggerStrings`?
>
> export interface CompletionOptions {
> /**
> * The server provides support to resolve additional
> * information for a completion item.
> */
> resolveProvider?: boolean;
>
> /**
> * The characters that trigger completion automatically.
> */
> triggerCharacters?: string[];
> }
>
>
> https://microsoft.github.io/language-server-protocol/specification
I think LSP uses a single character as a trigger character (see CompletionTriggerKind::TriggerCharacter). The `string` type of `triggerCharacter` is misleading, a more correct type is `char` I believe, but `char` is not the basic type in JSON schema.
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55994/new/
https://reviews.llvm.org/D55994
More information about the cfe-commits
mailing list