Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
6e1c02e
Associate font with EditorTheme/Attribute
dch09 Mar 9, 2025
4a21573
Add mappedName variable
dch09 Mar 9, 2025
67f86bf
Style GutterView using theme attributes
dch09 Mar 9, 2025
7bbf7d7
Pass `captureName` to capture attributes
dch09 Mar 9, 2025
79ed688
wip
dch09 Mar 23, 2025
d64c437
Override loadView method
dch09 Mar 23, 2025
54fca34
Specify `destination` Better In tests.sh
thecoolwinter Apr 3, 2025
2d3b462
Update CodeEditTextView (#299)
thecoolwinter Apr 6, 2025
603e89c
Move Overscroll To TextView (#296)
FastestMolasses Apr 7, 2025
59d8cb4
Update Docc Push Action Version
thecoolwinter Apr 8, 2025
f444927
feat: Find in Editor (#295)
tom-ludwig Apr 8, 2025
1beac47
Fix StyledRangeStore Crash (#303)
thecoolwinter Apr 11, 2025
af2d71b
[chore:] Update CodeEditTextView to 0.9.1 (#307)
thecoolwinter Apr 14, 2025
15798b8
Fix Multi-line and Multi-selection Indentation and Keyboard Shortcuts…
hi2gage Apr 17, 2025
645456d
Minimap (#302)
thecoolwinter Apr 21, 2025
bb2cbf5
Smarter Default Highlight Provider Management (#310)
thecoolwinter Apr 21, 2025
8985e21
Highlighter Highlights Text in Minimap (#308)
thecoolwinter Apr 22, 2025
412b0a2
Fix Gutter Position On Small Documents (#312)
thecoolwinter Apr 23, 2025
334506c
Use GitHubActions SwiftLint Reporter
thecoolwinter Apr 25, 2025
3dccebd
Added Reformatting Guide (#314)
austincondiff Apr 28, 2025
b96f270
Find: Replace and Match Case Toggle (#301)
austincondiff May 9, 2025
1109665
[chore:] Update CodeEditTextView to `0.11.0` (#318)
thecoolwinter May 27, 2025
30eb8a8
[hotfix:] Use Correct Minimap Line Height (#321)
thecoolwinter May 28, 2025
00cc9c6
Run CI On PRs to Feature Branches
thecoolwinter May 29, 2025
e624f42
Update CI-pull-request.yml
thecoolwinter May 29, 2025
f07d9fa
Revert Change
thecoolwinter May 29, 2025
deaca0e
Make styled range store generic (#323)
thecoolwinter May 30, 2025
9339c42
Find Method Picker (#322)
austincondiff May 30, 2025
7830486
Fix Overlapping Lines Method (#326)
thecoolwinter May 31, 2025
162f3d8
Add the ability to move selected lines up and down (#327)
Bogdan-Belogurov Jun 2, 2025
6f1ceca
Use Better Text Storage In Example (#328)
thecoolwinter Jun 2, 2025
7f6b7b5
Added product icons to example app (#329)
austincondiff Jun 2, 2025
83aee5b
Increase Git's HTTP Post Buffer Size (fix Docs CI)
thecoolwinter Jun 11, 2025
767453d
Fix Broken Tests Badge
thecoolwinter Jun 11, 2025
e955486
Remove the use of NSEvent for lines movement API (#333)
Bogdan-Belogurov Jun 14, 2025
c2fdc98
Draw Invisible Characters (#334)
thecoolwinter Jun 18, 2025
bb72694
Improve Editor Configuration, Rename to `SourceEditor` (#336)
thecoolwinter Jun 23, 2025
1c87221
[chore:] Update CodeEditTextView to `0.11.3` (#338)
thecoolwinter Jun 23, 2025
99779fa
Improve Public API (#339)
thecoolwinter Jun 24, 2025
da5168b
Expand Two-Way Editor State Bindings (#337)
thecoolwinter Jun 24, 2025
fd1fafe
Fix Broken Doc Link
thecoolwinter Jun 24, 2025
1a6e32c
Ensure Coordinator's Lifetime is Equal To The Editor's (#340)
thecoolwinter Jun 25, 2025
a7a181f
Update Documentation
thecoolwinter Jun 26, 2025
7e6d434
Fix Broken Documentation Links (#342)
thecoolwinter Jun 26, 2025
a148366
Clean Up Documentation Site (#343)
thecoolwinter Jun 26, 2025
8a47aa4
Code Folding (#341)
thecoolwinter Jul 2, 2025
afc5752
Fix Style Store Crash (#345)
thecoolwinter Jul 7, 2025
fe51d30
Fix Bugs With Multiple Highlight Providers (#346)
thecoolwinter Jul 21, 2025
e9136b4
Update CodeEditTextView to `0.12.0` (#347)
thecoolwinter Jul 23, 2025
cf39f6d
Autocomplete Feature (#282)
FastestMolasses Jul 29, 2025
c0d2c90
Jump To Definition (#348)
thecoolwinter Aug 18, 2025
ee0c00a
Only Show Jump to Def When Available (#349)
thecoolwinter Aug 21, 2025
424453d
Suggestion Window Fixes (#350)
thecoolwinter Aug 27, 2025
5b10252
Remove Unnecessary `completionTriggerCharacters` Configuration (#352)
thecoolwinter Sep 16, 2025
4a3cb13
Documentation, Improve Public AppKit API (#353)
thecoolwinter Sep 16, 2025
1fa4d3c
Fix macOS 13 compatibility (#356)
nekohasekai Dec 31, 2025
a979848
Merge CodeEditApp/main and adapt Syntactic* layer to SourceEditorConf…
dch09 Jul 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ export LC_CTYPE=en_US.UTF-8
set -o pipefail && arch -"${ARCH}" xcodebuild \
-scheme CodeEditSourceEditor \
-derivedDataPath ".build" \
-destination "platform=macos,arch=${ARCH}" \
-destination "platform=macOS,arch=${ARCH},name=My Mac" \
-skipPackagePluginValidation \
clean test | xcpretty
2 changes: 1 addition & 1 deletion .github/workflows/CI-pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI - Pull Request
on:
pull_request:
branches:
branches:
- 'main'
workflow_dispatch:
jobs:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ jobs:
run: |
cd docs
git init
git config http.postBuffer 524288000
git add -A
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m 'deploy'

- name: Force push to destination branch
uses: ad-m/github-push-action@v0.6.0
uses: ad-m/github-push-action@v0.8.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: GitHub Action for SwiftLint with --strict
run: swiftlint --strict
run: swiftlint --reporter github-actions-logging --strict
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
objects = {

/* Begin PBXBuildFile section */
1CB30C3A2DAA1C28008058A7 /* IndentPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CB30C392DAA1C28008058A7 /* IndentPicker.swift */; };
61621C612C74FB2200494A4A /* CodeEditSourceEditor in Frameworks */ = {isa = PBXBuildFile; productRef = 61621C602C74FB2200494A4A /* CodeEditSourceEditor */; };
61CE772F2D19BF7D00908C57 /* CodeEditSourceEditor in Frameworks */ = {isa = PBXBuildFile; productRef = 61CE772E2D19BF7D00908C57 /* CodeEditSourceEditor */; };
61CE77322D19BFAA00908C57 /* CodeEditSourceEditor in Frameworks */ = {isa = PBXBuildFile; productRef = 61CE77312D19BFAA00908C57 /* CodeEditSourceEditor */; };
6C13652E2B8A7B94004A1D18 /* CodeEditSourceEditorExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C13652D2B8A7B94004A1D18 /* CodeEditSourceEditorExampleApp.swift */; };
6C1365302B8A7B94004A1D18 /* CodeEditSourceEditorExampleDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C13652F2B8A7B94004A1D18 /* CodeEditSourceEditorExampleDocument.swift */; };
6C1365322B8A7B94004A1D18 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C1365312B8A7B94004A1D18 /* ContentView.swift */; };
Expand All @@ -17,9 +20,13 @@
6C1365462B8A7F2D004A1D18 /* LanguagePicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C1365452B8A7F2D004A1D18 /* LanguagePicker.swift */; };
6C1365482B8A7FBF004A1D18 /* EditorTheme+Default.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C1365472B8A7FBF004A1D18 /* EditorTheme+Default.swift */; };
6C13654D2B8A821E004A1D18 /* NSColor+Hex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C13654C2B8A821E004A1D18 /* NSColor+Hex.swift */; };
6C730A042E32CA2A00FE1F32 /* MockJumpToDefinitionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C730A032E32CA2A00FE1F32 /* MockJumpToDefinitionDelegate.swift */; };
6C8B564C2E3018CC00DC3F29 /* MockCompletionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C8B564B2E3018CC00DC3F29 /* MockCompletionDelegate.swift */; };
6CF31D4E2DB6A252006A77FD /* StatusBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CF31D4D2DB6A252006A77FD /* StatusBar.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
1CB30C392DAA1C28008058A7 /* IndentPicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IndentPicker.swift; sourceTree = "<group>"; };
6C13652A2B8A7B94004A1D18 /* CodeEditSourceEditorExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CodeEditSourceEditorExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
6C13652D2B8A7B94004A1D18 /* CodeEditSourceEditorExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodeEditSourceEditorExampleApp.swift; sourceTree = "<group>"; };
6C13652F2B8A7B94004A1D18 /* CodeEditSourceEditorExampleDocument.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodeEditSourceEditorExampleDocument.swift; sourceTree = "<group>"; };
Expand All @@ -33,6 +40,9 @@
6C1365452B8A7F2D004A1D18 /* LanguagePicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LanguagePicker.swift; sourceTree = "<group>"; };
6C1365472B8A7FBF004A1D18 /* EditorTheme+Default.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "EditorTheme+Default.swift"; sourceTree = "<group>"; };
6C13654C2B8A821E004A1D18 /* NSColor+Hex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSColor+Hex.swift"; sourceTree = "<group>"; };
6C730A032E32CA2A00FE1F32 /* MockJumpToDefinitionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockJumpToDefinitionDelegate.swift; sourceTree = "<group>"; };
6C8B564B2E3018CC00DC3F29 /* MockCompletionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockCompletionDelegate.swift; sourceTree = "<group>"; };
6CF31D4D2DB6A252006A77FD /* StatusBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusBar.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -41,6 +51,8 @@
buildActionMask = 2147483647;
files = (
61621C612C74FB2200494A4A /* CodeEditSourceEditor in Frameworks */,
61CE772F2D19BF7D00908C57 /* CodeEditSourceEditor in Frameworks */,
61CE77322D19BFAA00908C57 /* CodeEditSourceEditor in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -108,8 +120,12 @@
6C13654A2B8A7FD2004A1D18 /* Views */ = {
isa = PBXGroup;
children = (
6C8B564B2E3018CC00DC3F29 /* MockCompletionDelegate.swift */,
6C1365312B8A7B94004A1D18 /* ContentView.swift */,
6CF31D4D2DB6A252006A77FD /* StatusBar.swift */,
6C1365452B8A7F2D004A1D18 /* LanguagePicker.swift */,
1CB30C392DAA1C28008058A7 /* IndentPicker.swift */,
6C730A032E32CA2A00FE1F32 /* MockJumpToDefinitionDelegate.swift */,
);
path = Views;
sourceTree = "<group>";
Expand Down Expand Up @@ -140,6 +156,8 @@
name = CodeEditSourceEditorExample;
packageProductDependencies = (
61621C602C74FB2200494A4A /* CodeEditSourceEditor */,
61CE772E2D19BF7D00908C57 /* CodeEditSourceEditor */,
61CE77312D19BFAA00908C57 /* CodeEditSourceEditor */,
);
productName = CodeEditSourceEditorExample;
productReference = 6C13652A2B8A7B94004A1D18 /* CodeEditSourceEditorExample.app */;
Expand Down Expand Up @@ -197,11 +215,15 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6C730A042E32CA2A00FE1F32 /* MockJumpToDefinitionDelegate.swift in Sources */,
6C1365482B8A7FBF004A1D18 /* EditorTheme+Default.swift in Sources */,
6C13654D2B8A821E004A1D18 /* NSColor+Hex.swift in Sources */,
6C1365302B8A7B94004A1D18 /* CodeEditSourceEditorExampleDocument.swift in Sources */,
6CF31D4E2DB6A252006A77FD /* StatusBar.swift in Sources */,
6C13652E2B8A7B94004A1D18 /* CodeEditSourceEditorExampleApp.swift in Sources */,
6C1365442B8A7EED004A1D18 /* String+Lines.swift in Sources */,
6C8B564C2E3018CC00DC3F29 /* MockCompletionDelegate.swift in Sources */,
1CB30C3A2DAA1C28008058A7 /* IndentPicker.swift in Sources */,
6C1365322B8A7B94004A1D18 /* ContentView.swift in Sources */,
6C1365462B8A7F2D004A1D18 /* LanguagePicker.swift in Sources */,
);
Expand Down Expand Up @@ -412,6 +434,14 @@
isa = XCSwiftPackageProductDependency;
productName = CodeEditSourceEditor;
};
61CE772E2D19BF7D00908C57 /* CodeEditSourceEditor */ = {
isa = XCSwiftPackageProductDependency;
productName = CodeEditSourceEditor;
};
61CE77312D19BFAA00908C57 /* CodeEditSourceEditor */ = {
isa = XCSwiftPackageProductDependency;
productName = CodeEditSourceEditor;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 6C1365222B8A7B94004A1D18 /* Project object */;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,58 +1,68 @@
{
"images" : [
{
"size" : "16x16",
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
"filename" : "CodeEditSourceEditor-Icon-16.png",
"scale" : "1x"
},
{
"size" : "16x16",
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
"filename" : "CodeEditSourceEditor-Icon-32.png",
"scale" : "2x"
},
{
"size" : "32x32",
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
"filename" : "CodeEditSourceEditor-Icon-32.png",
"scale" : "1x"
},
{
"size" : "32x32",
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
"filename" : "CodeEditSourceEditor-Icon-64.png",
"scale" : "2x"
},
{
"size" : "128x128",
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
"filename" : "CodeEditSourceEditor-Icon-128.png",
"scale" : "1x"
},
{
"size" : "128x128",
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
"filename" : "CodeEditSourceEditor-Icon-256.png",
"scale" : "2x"
},
{
"size" : "256x256",
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
"filename" : "CodeEditSourceEditor-Icon-256.png",
"scale" : "1x"
},
{
"size" : "256x256",
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
"filename" : "CodeEditSourceEditor-Icon-512.png",
"scale" : "2x"
},
{
"size" : "512x512",
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
"filename" : "CodeEditSourceEditor-Icon-512.png",
"scale" : "1x"
},
{
"size" : "512x512",
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
"filename" : "CodeEditSourceEditor-Icon-1024.png",
"scale" : "2x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
"version" : 1,
"author" : "xcode"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ struct CodeEditSourceEditorExampleApp: App {
DocumentGroup(newDocument: CodeEditSourceEditorExampleDocument()) { file in
ContentView(document: file.$document, fileURL: file.fileURL)
}
.windowToolbarStyle(.unifiedCompact)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@
import SwiftUI
import UniformTypeIdentifiers

struct CodeEditSourceEditorExampleDocument: FileDocument {
var text: String
struct CodeEditSourceEditorExampleDocument: FileDocument, @unchecked Sendable {
enum DocumentError: Error {
case failedToEncode
}

var text: NSTextStorage

init(text: String = "") {
init(text: NSTextStorage = NSTextStorage(string: "")) {
self.text = text
}

Expand All @@ -25,11 +29,31 @@ struct CodeEditSourceEditorExampleDocument: FileDocument {
guard let data = configuration.file.regularFileContents else {
throw CocoaError(.fileReadCorruptFile)
}
text = String(decoding: data, as: UTF8.self)
var nsString: NSString?
NSString.stringEncoding(
for: data,
encodingOptions: [
// Fail if using lossy encoding.
.allowLossyKey: false,
// In a real app, you'll want to handle more than just this encoding scheme. Check out CodeEdit's
// implementation for a more involved solution.
.suggestedEncodingsKey: [NSUTF8StringEncoding],
.useOnlySuggestedEncodingsKey: true
],
convertedString: &nsString,
usedLossyConversion: nil
)
if let nsString {
self.text = NSTextStorage(string: nsString as String)
} else {
fatalError("Failed to read file")
}
}

func fileWrapper(configuration: WriteConfiguration) throws -> FileWrapper {
let data = Data(text.utf8)
guard let data = (text.string as NSString?)?.data(using: NSUTF8StringEncoding) else {
throw DocumentError.failedToEncode
}
return .init(regularFileWithContents: data)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import AppKit
import CodeEditSourceEditor

extension EditorTheme {
static var standard: EditorTheme {
static var light: EditorTheme {
EditorTheme(
text: Attribute(color: NSColor(hex: "000000")),
insertionPoint: NSColor(hex: "000000"),
Expand All @@ -25,9 +25,29 @@ extension EditorTheme {
variables: Attribute(color: NSColor(hex: "0F68A0")),
values: Attribute(color: NSColor(hex: "6C36A9")),
numbers: Attribute(color: NSColor(hex: "1C00CF")),
strings: Attribute(color: NSColor(hex: "C41A16"), bold: true, italic: true),
strings: Attribute(color: NSColor(hex: "C41A16")),
characters: Attribute(color: NSColor(hex: "1C00CF")),
comments: Attribute(color: NSColor(hex: "267507"), italic: true)
comments: Attribute(color: NSColor(hex: "267507"))
)
}
static var dark: EditorTheme {
EditorTheme(
text: Attribute(color: NSColor(hex: "FFFFFF")),
insertionPoint: NSColor(hex: "007AFF"),
invisibles: Attribute(color: NSColor(hex: "53606E")),
background: NSColor(hex: "292A30"),
lineHighlight: NSColor(hex: "2F3239"),
selection: NSColor(hex: "646F83"),
keywords: Attribute(color: NSColor(hex: "FF7AB2"), bold: true),
commands: Attribute(color: NSColor(hex: "78C2B3")),
types: Attribute(color: NSColor(hex: "6BDFFF")),
attributes: Attribute(color: NSColor(hex: "CC9768")),
variables: Attribute(color: NSColor(hex: "4EB0CC")),
values: Attribute(color: NSColor(hex: "B281EB")),
numbers: Attribute(color: NSColor(hex: "D9C97C")),
strings: Attribute(color: NSColor(hex: "FF8170")),
characters: Attribute(color: NSColor(hex: "D9C97C")),
comments: Attribute(color: NSColor(hex: "7F8C98"))
)
}
}
Loading