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:
parent
9ccee0f82f
commit
33f03d36a5
@ -2672,6 +2672,8 @@ fn makeScopeInternal(
|
|||||||
try enum_completions.put(allocator, .{
|
try enum_completions.put(allocator, .{
|
||||||
.label = name,
|
.label = name,
|
||||||
.kind = .Constant,
|
.kind = .Constant,
|
||||||
|
.insertText = name,
|
||||||
|
.insertTextFormat = .PlainText,
|
||||||
.documentation = if (try getDocComments(allocator, tree, decl, .Markdown)) |docs| .{
|
.documentation = if (try getDocComments(allocator, tree, decl, .Markdown)) |docs| .{
|
||||||
.kind = .Markdown,
|
.kind = .Markdown,
|
||||||
.value = docs,
|
.value = docs,
|
||||||
|
Loading…
Reference in New Issue
Block a user