fix block label completion test
This commit is contained in:
parent
84228a612e
commit
1e733a8782
@ -328,7 +328,9 @@ fn declToCompletion(context: DeclToCompletionContext, decl_handle: Analyser.Decl
|
|||||||
var allocator = context.server.arena.allocator();
|
var allocator = context.server.arena.allocator();
|
||||||
|
|
||||||
const tree = decl_handle.handle.tree;
|
const tree = decl_handle.handle.tree;
|
||||||
switch (decl_handle.decl.*) {
|
const decl = decl_handle.decl.*;
|
||||||
|
|
||||||
|
switch (decl) {
|
||||||
.ast_node => |node| try nodeToCompletion(
|
.ast_node => |node| try nodeToCompletion(
|
||||||
context.server,
|
context.server,
|
||||||
context.completions,
|
context.completions,
|
||||||
@ -374,7 +376,7 @@ fn declToCompletion(context: DeclToCompletionContext, decl_handle: Analyser.Decl
|
|||||||
|
|
||||||
try context.completions.append(allocator, .{
|
try context.completions.append(allocator, .{
|
||||||
.label = name,
|
.label = name,
|
||||||
.kind = .Variable,
|
.kind = if (decl == .label_decl) .Text else .Variable,
|
||||||
.insertText = name,
|
.insertText = name,
|
||||||
.insertTextFormat = .PlainText,
|
.insertTextFormat = .PlainText,
|
||||||
});
|
});
|
||||||
|
@ -404,7 +404,6 @@ test "completion - usingnamespace" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
test "completion - block" {
|
test "completion - block" {
|
||||||
if (true) return error.SkipZigTest;
|
|
||||||
try testCompletion(
|
try testCompletion(
|
||||||
\\const foo = blk: {
|
\\const foo = blk: {
|
||||||
\\ break :<cursor>
|
\\ break :<cursor>
|
||||||
|
Loading…
Reference in New Issue
Block a user