diff --git a/src/tui/editor.zig b/src/tui/editor.zig index d7d256b..728e485 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -3490,6 +3490,12 @@ pub const Editor = struct { return project_manager.completion(file_path, primary.cursor.row, primary.cursor.col); } + pub fn hover(self: *Self, _: Context) Result { + const file_path = self.file_path orelse return; + const primary = self.get_primary(); + return project_manager.hover(file_path, primary.cursor.row, primary.cursor.col); + } + pub fn add_diagnostic( self: *Self, file_path: []const u8, diff --git a/src/tui/mainview.zig b/src/tui/mainview.zig index 420d7de..a439f24 100644 --- a/src/tui/mainview.zig +++ b/src/tui/mainview.zig @@ -123,6 +123,9 @@ pub fn receive(self: *Self, from_: tp.pid_ref, m: tp.message) error{Exit}!bool { } else if (try m.match(.{ "FIF", "done" })) { self.find_in_files_done = true; return true; + } else if (try m.match(.{ "hover", tp.extract(&path), tp.extract(&begin_line), tp.extract(&begin_pos), tp.string, tp.extract(&lines) })) { + try self.add_info_content(lines); + return true; } else if (try m.match(.{"write_restore_info"})) { self.write_restore_info(); return true;