Skip to content

Conversation

@Kvadratni
Copy link
Collaborator

@Kvadratni Kvadratni commented Jan 17, 2026

Summary

  • Adds "Go to Definition" functionality via Cmd+Click or right-click context menu
  • Uses Tree-sitter for accurate code parsing across 17 languages
  • Opens definitions as reference files when not part of current diff
  • Shows tooltip feedback when definition is not found

Supported Languages

TypeScript, TSX, JavaScript, JSX, Rust, Python, Go, Java, C, C++, C#, Ruby, PHP, Bash, HTML, CSS, JSON

Implementation

  • Backend: New symbols module with Tree-sitter parsing, language detection, and definition finding
  • Frontend: ContextMenu component, symbolNavigation service, click handlers with Cmd key detection

🤖 Generated with Claude Code

Kvadratni and others added 4 commits January 16, 2026 16:10
Adds symbol navigation functionality using Tree-sitter for code parsing:

- Cmd+Click on symbols to jump to their definition
- Right-click context menu with "Go to Definition" option
- Opens definitions as reference files if not in current diff
- Shows tooltip when definition is not found
- Supports 17 languages: TypeScript, JavaScript, Rust, Python, Go,
  Java, C, C++, C#, Ruby, PHP, Bash, HTML, CSS, JSON, and variants

Backend (Rust):
- New symbols module with Tree-sitter parsing
- Language detection from file extensions
- Definition finding in same file, imports, and sibling modules
- Filters out string literals, comments, and keywords

Frontend (Svelte):
- ContextMenu component for right-click actions
- symbolNavigation service for IPC calls
- Click handlers with Cmd key detection
- Tooltip for "Definition not found" feedback

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use git ls-tree to list files at a specific ref instead of reading
from the filesystem. This allows Go to Definition to work on committed
files, not just the working directory.

- Add list_files_in_dir to git/files.rs using git ls-tree
- Update find_definition to accept a list_files callback
- Wire up the callback in lib.rs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When opening a reference file, if it doesn't exist at the given ref
(e.g., a new file on a feature branch not in HEAD), fallback to
reading from the working directory.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a branch indicator showing the currently checked-out branch
in the top bar, next to the diff selector.

- Add get_current_branch command to Rust backend (uses git symbolic-ref)
- Add getCurrentBranch function to frontend git service
- Display branch name with icon in TopBar left section
- Handle detached HEAD state (shows nothing)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Kvadratni Kvadratni requested a review from baxen January 22, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants