-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Comparing changes
Open a pull request
base repository: CodeEditApp/CodeEdit
base: v0.3.5
head repository: CodeEditApp/CodeEdit
compare: refs/heads/main
- 17 commits
- 138 files changed
- 3 contributors
Commits on Jul 10, 2025
-
Implement Invisible Characters Setting (#2065)
### Description Implements invisible character drawing in CodeEdit, including warning characters for ambiguous or invisible characters. This is stored in a new submenu in the Text Editing settings page. I decided a pane like this was the best option, as a table cannot grow to fit it's contents or scroll when it's placed in some Forms (like our settings pages for some reason). The table also takes up a lot of space, so I felt it was a good use of a sheet. ### Related Issues * closes CodeEditApp/CodeEditTextView#22 * closes CodeEditApp/CodeEditSourceEditor#207 ### Checklist - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](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 https://github.com/user-attachments/assets/9d3b59c8-c506-471d-8ab6-840860e0c526
Configuration menu - View commit details
-
Copy full SHA for 666d33b - Browse repository at this point
Copy the full SHA 666d33bView commit details -
### Description Implements editor restoration, helping ease the user experience for longer editing tasks spanning multiple files. Users expect opened tabs to retain the scroll position, cursors, and undo stack. To facilitate this, we receive a stream of state updates from the editor and save them to a SQLite DB. When a file is opened again, the state is restored from that DB. Ideally this is transparent to the user. However, there is one very slight UX flaw that this doesn't address: highlighting. When a user restores an editor there can be a flash as the highlighter works to do syntax highlighting on the newly opened editor. Some potential future directions: - The text storage object that outlives editors does retain color information, if we could avoid wiping that color information when an editor is loaded we could avoid that slight delay. - To do that, we need to store that state with the storage object somehow. Either through a custom text attribute (could be finicky) or maybe by subclassing NSTextStorage and adding a flag. > [!NOTE] > This includes a mechanism for sharing undo stacks for editors during a workspace's lifetime. As @austincondiff mentioned on discord, it should add a undo frame when a file is updated externally. This PR notably does not include that change. I'll be adding it in #2075 ### Related Issues * closes #2057 ### Checklist - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](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 https://github.com/user-attachments/assets/6a9ff5ea-743e-4183-83c9-b774915b0c35
Configuration menu - View commit details
-
Copy full SHA for 4ce9be0 - Browse repository at this point
Copy the full SHA 4ce9be0View commit details
Commits on Jul 11, 2025
-
Ensure LSPs Exit, Add Exit Activities (#2080)
### Description LSPs may refuse to exit (due to a bug or whatnot) but we need to ensure that CodeEdit can still close when quit. This adds both a timeout when language servers are stopped, and a method to send `SIGKILL` to language servers if necessary. This can only cause a delay while quitting CodeEdit. To help with the UX here, I've added some activity notifications that tell the user why we're delaying quitting CodeEdit. Both task termination and language server stopping are displayed while CodeEdit attempts to quit. #### Detailed Changes - Updated the `LanguageClient` package to use a new method that lets us grab the started language server process. - The `pid_t` of the process is stored on `LanguageServer` for future use. - Updated `LSPService.stopServer` to not use a throwing task group. For some reason the task group refused to continue even if the language server did close correctly. A non-throwing task group works correctly. - Added `LSPService.killAllServers` to send `SIGKILL` to all language servers if necessary. - Updated `AppDelegate` to send activity notifications when delaying quitting the app. - Updated `AppDelegate` to timeout language server stopping and kill them if necessary. - Added a little helper to `TaskNotificationHandler` to help with sending tasks. Updated docs to match. - Added a new parameter to `TaskNotificationHandler` to limit activities to a single workspace. If left out, does not limit the workspace. - Because of the new workspace parameter, I quickly limited tasks to only notify their workspaces. - I also added a second ID to `CEActiveTask` to differentiate between task runs (see screen recording). ### Related Issues * related #1976 ### Checklist - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](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 Before change. Tasks show up in all workspaces, cancelled tasks remove new task activities. https://github.com/user-attachments/assets/7a4f390d-5918-450c-afc7-ec164d7bb1e3 After the change. Active tasks have their own ID and cancelled tasks don't remove new task activities. https://github.com/user-attachments/assets/5502f0b6-b34c-4c24-9ae4-f6eab3fc7100
Configuration menu - View commit details
-
Copy full SHA for 334357f - Browse repository at this point
Copy the full SHA 334357fView commit details
Commits on Jul 15, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 704da8a - Browse repository at this point
Copy the full SHA 704da8aView commit details
Commits on Jul 16, 2025
-
Language server installation menu (#1997)
### Description A system to allow users to download and manage LSP servers from the settings menu. This utilizes the mason registry to track the language servers. ### Related Issues ### Checklist - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](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
Configuration menu - View commit details
-
Copy full SHA for f044fd9 - Browse repository at this point
Copy the full SHA f044fd9View commit details -
Configuration menu - View commit details
-
Copy full SHA for f991614 - Browse repository at this point
Copy the full SHA f991614View commit details -
Add
⌘R
and⌘.
to Start and Stop Tasks, Add Tasks Menu (#2081)### Description - Adds two key commands - Command R and Command . to start and stop tasks. - Adds a new Tasks menu item. Subitems: - Run {Selected Task} - Runs the selected task, disabled when no selected task. - Stop {Selected Task} - Stops the selected task, disabled when no task is running. - Show {Selected Task} Output - Navigates to the selected task output - this could maybe? be in the Navigate menu. *Looking for feedback here.* - Chose Task... - Submenu is a list of the user's tasks. Selects a task. If the user has no tasks, has a single "Create Task" item. - Manage Tasks - Opens the workspace's task settings. ### Related Issues * Thought there was an open issue but there isn't, whoops. ### Checklist - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](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 Demo with running a task, stopping it, navigating to it's output. > Note that there's a few bugs in this demo that are fixed by #2080. Such as overlapping task status and task activities appearing in all workspaces. https://github.com/user-attachments/assets/602dedf2-3626-4ea1-a04b-9d7a9945a458
Configuration menu - View commit details
-
Copy full SHA for cfbca15 - Browse repository at this point
Copy the full SHA cfbca15View commit details -
Reflect External File Changes (#2075)
### Description Implements reflecting external changes in open files. If a file has no unsaved changes, and is notified that the contents changed, it reloads the contents. `NSDocument` already handles asking the user if they want to overwrite the contents of the file or use the disk version if the user attempts to save to a file that has been updated since they edited the file. When a successful reload happens, the `CodeFileDocument` will also register a new undo frame with the new contents. This allows the user to undo changes that are reflected in the editor. When a file is updated externally and there are no open editors, the cached undo stack is cleared. #### Detailed changes: - Override `CodeFileDocument.presentedItemDidChange` to handle notifications about file changes. - If the file's current modification date != the last recorded one, we assume it has been changed on disk. - If `isDocumentEdited` is false, we block the calling thread and reload the document. - In `CodeFileDocument.read`, we check to see if the file has already been read into the `NSTextStorage` object. - If it has, we replace the contents with the new contents. This will be reflected in any open editors. Replacing the object would lose any subscribers (like the text view and syntax highlighting). - We also register the undo frame here. - Centralized the code that loads `CodeFileDocument`s into `CEWorkspaceFile`. Previously it was in a few different places. - Added `UndoManagerRestoration` to receive file system events. It uses these to invalidate undo stacks where necessary. - Updated `CodeFileView` to use the file document's object ID as SwiftUI's identifier. This fixed a bug where a document was sometimes 'cached' by the document controller and meant SwiftUI didn't load up a new view for the new document. This ID is stable while a file is open in an editor. - Fixed ~3 memory leaks related to `CodeFileDocument` that were causing the file to not reload when it was closed and opened again. - The changes to `EditorLayout+StateRestoration.swift` are all related to this. - Any changes where I just added a `[weak codeFile]` are similarly related. ### Related Issues * closes #1826 ### Checklist - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](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 Demo of new behavior. I first undo modifications to the open file, then make some modifications. The changes are added to the current undo stack. I cause a lint again and then undo all the changes and close the file. I then make more external changes (invalidating the undo stack) and open the file, where Command-Z no longer has any effect because of the changes that happened while the file wasn't opened. https://github.com/user-attachments/assets/b80acdcd-faf0-4b8a-88d2-8ebadfa9c7ff
Configuration menu - View commit details
-
Copy full SHA for 61a5e67 - Browse repository at this point
Copy the full SHA 61a5e67View commit details
Commits on Jul 18, 2025
-
SwiftUI cannot build because we have too many window commands in the commands builder. This just puts a few in a `Group` to allow SwiftUI to handle it.
Configuration menu - View commit details
-
Copy full SHA for 378478a - Browse repository at this point
Copy the full SHA 378478aView commit details -
Upgrade Output Utility, Add Language Server Output (#2092)
### Description Upgrades the output utility design and functionality. Implemented a new protocol for installing new output sources in the future. - Updated the existing LogStream source to conform to the new protocol. - Added a new `LanguageServerLogContainer` type to store language server logs, and be able to stream them to the output utility. - Updated the output utility to respond to live updates to sources. - Added language server logs to the output utility. - Un-commented the language server log notification handler to pass the log to the log container. ### Related Issues * #1888 ### Checklist - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](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 https://github.com/user-attachments/assets/aaea4ec7-e8e3-4297-bfbe-5a5c5cd86db1
Configuration menu - View commit details
-
Copy full SHA for 2a237bb - Browse repository at this point
Copy the full SHA 2a237bbView commit details
Commits on Jul 21, 2025
-
Terminal Emulator Task Output (#2088)
### Description Utilizes the terminal emulator to both run tasks and display output. ### Related Issues * closes #1959 * closes #1837 ### Checklist - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](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 https://github.com/user-attachments/assets/da464190-0faa-4961-86a2-7289a7a92064
Configuration menu - View commit details
-
Copy full SHA for 688dc84 - Browse repository at this point
Copy the full SHA 688dc84View commit details
Commits on Jul 30, 2025
-
Added global search keyboard shortcut (#2094)
### Description Added the Cmd+Shift+F keyboard shortcut to open the search navigator and focuses the search field. ### Related Issues Closes #2093 ### Checklist - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](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 https://github.com/user-attachments/assets/a3e607b7-39a6-4da6-9ac7-38764113b621
Configuration menu - View commit details
-
Copy full SHA for f054983 - Browse repository at this point
Copy the full SHA f054983View commit details
Commits on Aug 8, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 9e0ffc8 - Browse repository at this point
Copy the full SHA 9e0ffc8View commit details -
Fix: Terminals Losing Output (#2100)
### Description Fixes a bug introduced by #2092 where terminals that were not running a process would lose their cached output. Adds automation tests to ensure this is caught in the future! ### Related Issues * N/A ### Checklist - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](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 https://github.com/user-attachments/assets/dfeb38d7-ef56-4154-97dd-6d8fdbd641af
Configuration menu - View commit details
-
Copy full SHA for 39b1d39 - Browse repository at this point
Copy the full SHA 39b1d39View commit details
Commits on Aug 12, 2025
-
Fix Semantic Highlight Out-Of-Range Bug (#2097)
### Description Fixes a bug with semantic highlights where the returned highlights would be outside of the requested range. This fixes that by clamping all returned ranges to the requested range. ### Related Issues * N/A ### Checklist - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](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 N/A
Configuration menu - View commit details
-
Copy full SHA for f6f2b80 - Browse repository at this point
Copy the full SHA f6f2b80View commit details
Commits on Aug 21, 2025
-
Configuration menu - View commit details
-
Copy full SHA for ef9e91b - Browse repository at this point
Copy the full SHA ef9e91bView commit details -
Adjust LSP Content Object Lifecycle (#2102)
### Description Adjusts how LSP content objects are created and updated. CESE works best when coordinators and highlighters are static for the lifetime of the editor. This adjusts both the content coordinator and semantic highlighter objects to have optional document URIs and server references. That makes it so these objects will be passed into the editor immediately, and will just ignore requests or notifications until the language server tells the object about itself. The change fixes a bug where an editor opened that triggers a language server startup would not have a working semantic highlighter or update its contents with the server when the document was updated. This fixes that race condition. This also makes a small change to language server initialization, this creates the log container before the server and injects it into the data channel so if the channel terminates the log container can receive a message. ### Related Issues * N/A ### Checklist - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](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 N/A
Configuration menu - View commit details
-
Copy full SHA for 064854f - Browse repository at this point
Copy the full SHA 064854fView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v0.3.5...refs/heads/main