- Notifications
You must be signed in to change notification settings - Fork112
Tags: CodeEditApp/CodeEditSourceEditor
Tags
0.15.2
Suggestion Window Fixes (#350)### DescriptionGenerally improves a few UX bugs with the suggestion window.Specifically the window would flash often even if the controller did notre-request new items, and would sometimes move the window when itshouldn't have. Also adjusts the window's x position to align thecompletion labels with the text.- Centralizes suggestion presentation logic into a single class.- Moves the trigger character logic out of a filter and into a textviewdelegate-like method that checks if the last typed character was atrigger character.- Ensures the textview and cursor positions are up-to-date when thenotification is sent.- Helps remove duplicate cursor update notifications sent to thesuggestion controller by checking if an update is a duplicate in thecentralized logic controller.- Adjusts the suggestion window's x position to align the text in thecompletion labels with the text being typed.Also includes a few changes fixing some build warnings.### Related Issues*#282 ### Checklist- [x] I read and understood the [contributingguide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md)as well as the [code ofconduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)- [x] The issues this PR addresses are related to each other- [x] My changes generate no new warnings- [x] My code builds and runs on my machine- [x] My changes are all related to the related issue above- [x] I documented my code### Screenshotshttps://github.com/user-attachments/assets/14662210-0c15-422d-8dea-a5ae55b5d836
0.15.0
Jump To Definition (#348)### DescriptionAdds jump to definition, including a new key command (control-command-J)to initiate a jump, and an interaction (command + mouse click). Thedestination(s) for a jump is provided via a new object protocol,provided via the SwiftUI API. The popover presented when multiple linksare present reuses the completion window, with a slight modification sothat it appears as a popover with an arrow rather than a floatingwindow.Detailed changes:- Numerous fixes and improvements to the `SuggestionController` and`SuggestionViewController`, making them work when presented as apopover, as well as some resizing bugs.- New `CodeSuggestionPreviewView`. Displays preview information for acode suggestion, including a syntax-highlighted source preview,documentation, and a path component.- This only appears when one of the three potential information isavailable, otherwise it is hidden.- This view is a visual effect view, so it will inherit the style of thesuggestion controller from the user's theme with a slight tint.- New `JumpToDefinitionModel` manages the mouse interaction, as well asproviding the layer between the jump delegate and the code suggestionwindow.- New `JumpToDefinitionDelegate` protocol defines how the editor can usethe delegate object to query links and open them once selected.### Related Issues*CodeEditApp/CodeEdit#1902### Checklist- [x] I read and understood the [contributingguide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md)as well as the [code ofconduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)- [x] The issues this PR addresses are related to each other- [x] My changes generate no new warnings- [x] My code builds and runs on my machine- [x] My changes are all related to the related issue above- [x] I documented my code### Screenshotshttps://github.com/user-attachments/assets/81d5b24c-6332-4a33-8d2a-8f637bec3bce---------Co-authored-by: Abe M <abe.malla8@gmail.com>Co-authored-by: Wesley de Groot <email@wesleydegroot.nl>
0.14.2
Fix Bugs With Multiple Highlight Providers (#346)### DescriptionFixes a few issues when using multiple highlight providers.- RangeStore did not clamp its output to only the requested range whenquerying for runs in a specific range. This broke an assumption by thestyled store container, which broke the resulting highlighted ranges.- Adds some randomized testing to the query method to ensure thatruntime contract is maintained.- When reordering or adding new providers, their inferred priority wouldbe lost.### Related Issues* N/A### Checklist- [x] I read and understood the [contributingguide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md)as well as the [code ofconduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)- [x] The issues this PR addresses are related to each other- [x] My changes generate no new warnings- [x] My code builds and runs on my machine- [x] My changes are all related to the related issue above- [x] I documented my code### ScreenshotsN/A
0.14.1
Fix Style Store Crash (#345)### DescriptionFixes a crash when the styled range store has empty arrays and stilltries to remove values.### Related IssuesN/A### Checklist- [x] I read and understood the [contributingguide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md)as well as the [code ofconduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)- [x] The issues this PR addresses are related to each other- [x] My changes generate no new warnings- [x] My code builds and runs on my machine- [x] My changes are all related to the related issue above- [x] I documented my code### ScreenshotsN/A
0.14.0
Code Folding (#341)### DescriptionAdds a code folding ribbon.> [!NOTE]> For reviewers: Most of these changes have been reviewed individuallyin separate PRs. This shouldn't require a detailed combing over. If youcan review a few things in particular like: architecture, naming, andbugs with real use I think those would be the best use of your limitedtime.#### Detailed Changes- Folding-related changes- Added `FoldingRibbonView` - A view that draws a set of folding ranges.This does all the drawing manually to avoid having to manage view reuse,it does the drawing in the regions macOS designates so it only draws asmall part of the visible ribbon at a time.- Added `LineFoldProvider` - A protocol for classes to provide foldinformation to CodeEditSourceEditor. This takes a line number, range,depth, and a reference to the text controller and returns a list of'line info' objects.- Added `LineIndentationFoldProvider`, an implementation of`LineFoldProvider` that calculates folds based on the user's indentsetting.- Added `LineFoldCalculator`, which interfaces with the given`LineFoldProvider` to calculate new folds. This happens *asynchronously*and recalculates every so often. It's very fast but stays off the mainthread to avoid ever gumming up the user's typing.- Added `LineFoldingModel`, which is the glue between the text view,calculator, and view.- To display folded folds, we display a `LineFoldPlaceholder` in thetext view. This keeps a reference to the `LineFoldingModel` via adelegate protocol to tell the model when it's dismissed.<details><summary>This is a slightly complicated object graph, so I'veadded a diagram here</summary>```mermaidflowchart TD TV["TextView"] -->|Text Updates| LFM["LineFoldingModel"] PL["LineFoldPlaceholder"] --> |Placeholder Removed| LFM LFM -->|Text Updates| LFC["LineFoldCalculator"] LFC -->|LineFoldStorage| LFM LFM -->|Storage Updated| FRV["FoldingRibbonView"] LFC <--> |Fold Info| LFP["any LineFoldProvider"]```</details>- Gutter View changes- New property `showFoldingRibbon` toggles the visibility of the foldingribbon view. - The gutter now manages the folding ribbon view as a subview.- Added an additional padding option on the gutter for the foldingribbon.- Makes a slight modification to how it draws line numbers by using aline iterator in the drawn lines, rather than the 'visible lines'. Usesless resources when macOS only requests a redraw for a specific rectrather than the whole gutter.- Other, related changes- Modified the minimap. The minimap is now an attachment delegate to thetext view's attachment object. It receives updates to the text view'sattachments and adds a fake attachment to it's own layout manager. Thiseffectively syncs the text view's attachments to the minimap.- Renamed `DispatchQueue.syncMainIfNot` to `waitMainIfNot` and updatedit to use a better method for waiting for a dispatched work item. - Added an extension to `NSBezierPath` for rounding corners.- Added a new `NSColor` convenience initializer for creating light anddark mode colors more easily.- Moved the font character width calculation from `TextViewController`to an `NSFont` extension.### Related Issues*#43 ### Checklist- [x] Folds reflected in minimap.- [x] Double-click fold expands it.- [x] I read and understood the [contributingguide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md)as well as the [code ofconduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)- [x] The issues this PR addresses are related to each other- [x] My changes generate no new warnings- [x] My code builds and runs on my machine- [x] My changes are all related to the related issue above- [x] I documented my code### Screenshotshttps://github.com/user-attachments/assets/25e46ae4-3db5-4f08-8027-1fea9a8e64cb---------Co-authored-by: Austin Condiff <austin.condiff@gmail.com>
0.13.2
[hotfix:] Use Correct Minimap Line Height (#321)### DescriptionUpdates the `MinimapLineRenderer` to have the correct protocolparameters to correctly set it's customized layout information.### Related IssuesN/A### Checklist- [x] I read and understood the [contributingguide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md)as well as the [code ofconduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)- [x] The issues this PR addresses are related to each other- [x] My changes generate no new warnings- [x] My code builds and runs on my machine- [x] My changes are all related to the related issue above- [x] I documented my code### Screenshots
0.13.0
Find: Replace and Match Case Toggle (#301)### DescriptionThis PR adds the following functionality to the source editor findpanel:- Replace: Enables replacing matched text with the specifiedreplacement.- Toggle Match Navigation Wrap-Around: Allows cycling through matchesfrom the beginning when reaching the end.- Toggle Match Case: Adds an option to filter matches by casesensitivity.- Made find panel responsive at small sizes using `ViewThatFits`.### Related Issues*#295*CodeEditApp/CodeEditTextView#1### Checklist<!--- Add things that are not yet implemented above -->- [x] I read and understood the [contributingguide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md)as well as the [code ofconduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)- [x] The issues this PR addresses are related to each other- [x] My changes generate no new warnings- [x] My code builds and runs on my machine- [x] My changes are all related to the related issue above- [x] I documented my code### Screenshotshttps://github.com/user-attachments/assets/ec23ffe7-6d24-48b7-889a-11a92ec6c147https://github.com/user-attachments/assets/cfca6d8e-7b97-4258-ae2e-ee82bbf6b9af---------Co-authored-by: Khan Winter <35942988+thecoolwinter@users.noreply.github.com>
0.12.0
Fix Gutter Position On Small Documents (#312)### DescriptionFixes an issue where on small documents the text view / scroll viewwould get messed up when placing the gutter view relative to the toppadding. This makes the y position relative to the text view's yposition.### Related Issues* N/A### Checklist- [x] I read and understood the [contributingguide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md)as well as the [code ofconduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)- [x] The issues this PR addresses are related to each other- [x] My changes generate no new warnings- [x] My code builds and runs on my machine- [x] My changes are all related to the related issue above- [x] I documented my code### ScreenshotsBefore, would only appear on small files (1-3 lines):After:
PreviousNext