feat: add find all references LSP command

This commit is contained in:
CJ van den Berg 2024-08-16 00:02:42 +02:00
parent d1a79ea8b1
commit 78489e31f6
4 changed files with 99 additions and 0 deletions

View file

@ -3425,6 +3425,12 @@ pub const Editor = struct {
return project_manager.goto_definition(file_path, primary.cursor.row, primary.cursor.col);
}
pub fn references(self: *Self, _: Context) Result {
const file_path = self.file_path orelse return;
const primary = self.get_primary();
return project_manager.references(file_path, primary.cursor.row, primary.cursor.col);
}
pub fn completion(self: *Self, _: Context) Result {
const file_path = self.file_path orelse return;
const primary = self.get_primary();