feat(lsp): rename_symbol: treat out-of-file edits as references

This commit is contained in:
CJ van den Berg 2025-01-16 23:02:52 +01:00
parent a449e0ec97
commit 155c1f663d
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
3 changed files with 18 additions and 7 deletions

View file

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