completion: Add insertText field for enum completions

Another bug with the older version of lsp-mode on Emacs prevents the
label from being inserted when there is an empty `insertText`. This
commit adds an `insertText` property to enum completions for consistency
with the rest of the completion items.
This commit is contained in:
Benjamin Tan 2021-04-05 22:25:11 +08:00
parent 9ccee0f82f
commit 33f03d36a5
No known key found for this signature in database
GPG Key ID: A853F0716C413825

View File

@ -2672,6 +2672,8 @@ fn makeScopeInternal(
try enum_completions.put(allocator, .{
.label = name,
.kind = .Constant,
.insertText = name,
.insertTextFormat = .PlainText,
.documentation = if (try getDocComments(allocator, tree, decl, .Markdown)) |docs| .{
.kind = .Markdown,
.value = docs,