Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
thecoolwinter merged 52 commits into CodeEditApp:main from thecoolwinter:jump-to-definition
Aug 18, 2025
Merged

Conversation

Copy link
Collaborator

@thecoolwinter thecoolwinter commented Jul 30, 2025
edited
Loading

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:

  • Numerous fixes and improvements to the SuggestionController and SuggestionViewController, making them work when presented as a popover, as well as some resizing bugs.
  • New CodeSuggestionPreviewView. Displays preview information for a code suggestion, including a syntax-highlighted source preview, documentation, and a path component.
    • This only appears when one of the three potential information is available, otherwise it is hidden.
    • This view is a visual effect view, so it will inherit the style of the suggestion controller from the user's theme with a slight tint.
  • New JumpToDefinitionModel manages the mouse interaction, as well as providing the layer between the jump delegate and the code suggestion window.
  • New JumpToDefinitionDelegate protocol defines how the editor can use the delegate object to query links and open them once selected.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

Screen.Recording.2025年07月29日.at.4.06.50.PM.mov

FastestMolasses and others added 30 commits October 19, 2024 22:31
- 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.
Co-authored-by: Wesley de Groot <email@wesleydegroot.nl>
@thecoolwinter thecoolwinter merged commit c0d2c90 into CodeEditApp:main Aug 18, 2025
2 checks passed
@thecoolwinter thecoolwinter deleted the jump-to-definition branch August 18, 2025 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@0xWDG 0xWDG 0xWDG requested changes

@austincondiff austincondiff Awaiting requested review from austincondiff

@matthijseikelenboom matthijseikelenboom Awaiting requested review from matthijseikelenboom

@FastestMolasses FastestMolasses Awaiting requested review from FastestMolasses

@tom-ludwig tom-ludwig Awaiting requested review from tom-ludwig

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /