fix: set ast dump file type asyncronosly to avoid tree-sitter slowdown
This commit is contained in:
parent
0910900a9f
commit
42705867f1
1 changed files with 2 additions and 1 deletions
|
@ -4903,8 +4903,9 @@ pub const Editor = struct {
|
||||||
scratch_name.writer.print("*ast: {s}*", .{file_path})
|
scratch_name.writer.print("*ast: {s}*", .{file_path})
|
||||||
else
|
else
|
||||||
scratch_name.writer.print("*ast*", .{});
|
scratch_name.writer.print("*ast*", .{});
|
||||||
try command.executeName("open_scratch_buffer", command.fmt(.{ scratch_name.written(), ast.written(), "scheme" }));
|
try command.executeName("open_scratch_buffer", command.fmt(.{ scratch_name.written(), ast.written(), "text" }));
|
||||||
tp.self_pid().send(.{ "cmd", "navigate", .{ .file = scratch_name.written() } }) catch return;
|
tp.self_pid().send(.{ "cmd", "navigate", .{ .file = scratch_name.written() } }) catch return;
|
||||||
|
tp.self_pid().send(.{ "cmd", "set_file_type", .{"scheme"} }) catch return;
|
||||||
}
|
}
|
||||||
pub const dump_document_tree_meta: Meta = .{ .description = "Debug: dump current document tree" };
|
pub const dump_document_tree_meta: Meta = .{ .description = "Debug: dump current document tree" };
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue