Merge pull request #301 from bnjmnt4n/enum/insertText
Add `insertText` field for enum completions
This commit is contained in:
commit
003a7bcb96
@ -2602,8 +2602,8 @@ fn makeScopeInternal(
|
|||||||
try error_completions.put(allocator, .{
|
try error_completions.put(allocator, .{
|
||||||
.label = tree.tokenSlice(i),
|
.label = tree.tokenSlice(i),
|
||||||
.kind = .Constant,
|
.kind = .Constant,
|
||||||
.insertTextFormat = .PlainText,
|
|
||||||
.insertText = tree.tokenSlice(i),
|
.insertText = tree.tokenSlice(i),
|
||||||
|
.insertTextFormat = .PlainText,
|
||||||
}, {});
|
}, {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -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