feat: process completion response messages and send results to editor

This commit is contained in:
CJ van den Berg 2024-12-18 21:57:04 +01:00
parent 502710cadb
commit 286316b494
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 145 additions and 2 deletions

View file

@ -485,7 +485,7 @@ const Process = struct {
return project.references(from, file_path, row, col);
}
fn completion(self: *Process, from: tp.pid_ref, project_directory: []const u8, file_path: []const u8, row: usize, col: usize) (ProjectError || Project.LspOrClientError)!void {
fn completion(self: *Process, from: tp.pid_ref, project_directory: []const u8, file_path: []const u8, row: usize, col: usize) (ProjectError || Project.InvalidMessageError || Project.LspOrClientError || cbor.Error)!void {
const frame = tracy.initZone(@src(), .{ .name = module_name ++ ".completion" });
defer frame.deinit();
const project = self.projects.get(project_directory) orelse return error.NoProject;