feat: add highlight_references command
This commit is contained in:
parent
c6da708250
commit
ca47d27b76
2 changed files with 38 additions and 0 deletions
|
|
@ -140,6 +140,15 @@ pub fn receive(self: *Self, from_: tp.pid_ref, m: tp.message) error{Exit}!bool {
|
|||
}
|
||||
self.find_in_files_state = .done;
|
||||
return true;
|
||||
} else if (try m.match(.{ "HREF", tp.extract(&path), tp.extract(&begin_line), tp.extract(&begin_pos), tp.extract(&end_line), tp.extract(&end_pos), tp.extract(&lines) })) {
|
||||
if (self.get_active_editor()) |editor| editor.add_highlight_reference(.{
|
||||
.begin = .{ .row = begin_line, .col = begin_pos },
|
||||
.end = .{ .row = end_line, .col = end_pos },
|
||||
});
|
||||
return true;
|
||||
} else if (try m.match(.{ "HREF", "done" })) {
|
||||
if (self.get_active_editor()) |editor| editor.done_highlight_reference();
|
||||
return true;
|
||||
} else if (try m.match(.{ "hover", tp.extract(&path), tp.string, tp.extract(&lines), tp.extract(&begin_line), tp.extract(&begin_pos), tp.extract(&end_line), tp.extract(&end_pos) })) {
|
||||
try self.add_info_content(lines);
|
||||
if (self.get_active_editor()) |editor|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue