-
Notifications
You must be signed in to change notification settings - Fork 100
Jump To Definition #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
thecoolwinter
wants to merge
51
commits into
CodeEditApp:main
Choose a base branch
from
thecoolwinter:jump-to-definition
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Jump To Definition #348
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Creates a `SuggestionViewController` for managing the view contents of the window. - Renames `SuggestionControllerDelegate` to `CodeSuggestionDelegate` - Moves `CodeSuggestionEntry` to its own file. - Removes a few magic numbers - Removes the `horizontalOffset` parameter when moving the window. We'll rely on the suggestion delegate to tell us where to place the window's top-left corner.
0xWDG
requested changes
Jul 31, 2025
@@ -1,4 +1,4 @@ | |||
// | |||
z// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intentional?
Suggested change
z// | |
// |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds jump to definition, including a new key command (control-command-J) to initiate a jump, and an interaction (command + mouse click). The destination(s) for a jump is provided via a new object protocol, provided via the SwiftUI API. The popover presented when multiple links are present reuses the completion window, with a slight modification so that it appears as a popover with an arrow rather than a floating window.
Detailed changes:
SuggestionController
andSuggestionViewController
, making them work when presented as a popover, as well as some resizing bugs.CodeSuggestionPreviewView
. Displays preview information for a code suggestion, including a syntax-highlighted source preview, documentation, and a path component.JumpToDefinitionModel
manages the mouse interaction, as well as providing the layer between the jump delegate and the code suggestion window.JumpToDefinitionDelegate
protocol defines how the editor can use the delegate object to query links and open them once selected.Related Issues
Checklist
Screenshots
Screen.Recording.2025-07-29.at.4.06.50.PM.mov