feat: fetch lsp symbols on user demand

This commit is contained in:
Igor Támara 2025-11-13 13:18:03 -05:00 committed by CJ van den Berg
parent cc4ef5da2c
commit 368b139688
2 changed files with 9 additions and 1 deletions

View file

@ -5730,6 +5730,14 @@ pub const Editor = struct {
}
pub const completion_meta: Meta = .{ .description = "Language: Show completions at cursor" };
pub fn show_symbols(self: *Self, _: Context) Result {
const file_path = self.file_path orelse return;
const mv = tui.mainview() orelse return;
mv.clear_symbols(file_path);
return project_manager.symbols(file_path);
}
pub const show_symbols_meta: Meta = .{ .description = "Language: Show available symbols on current file" };
pub fn rename_symbol(self: *Self, _: Context) Result {
const file_path = self.file_path orelse return;
const root = self.buf_root() catch return;