Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ Licensed under the [MIT license](https://github.com/CodeEditApp/CodeEdit/blob/ma

### Text View

<<<<<<< chore/docs
- <doc:SourceEditor> The SwiftUI API for the source editor.
=======
- ``SourceEditor`` The SwiftUI API for the source editor.
>>>>>>> main
- ``SourceEditorConfiguration`` Customize the source editor's behavior, layout, appearance, and more.
- ``SourceEditorState`` Listen to the current state of the editor. Cursor positions, scroll positions, and more.
- ``TextViewController`` The AppKit view controller for the source editor.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ``SourceEditor``
# Source Editor

## Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ import AppKit
/// - The category initializer.
/// - The passthrough variable in `TextViewController`.

/// Configuration object for the ``SourceEditor``. Determines appearance, behavior, layout and what features are
/// Configuration object for the <doc:SourceEditor>. Determines appearance, behavior, layout and what features are
/// enabled (peripherals).
///
/// To update the configuration, update the ``TextViewController/configuration`` property, or pass a value to the
/// ``SourceEditor`` SwiftUI API. Both methods will call the `didSetOnController` method on this type, which will
/// <doc:SourceEditor> SwiftUI API. Both methods will call the `didSetOnController` method on this type, which will
/// update the text controller as necessary for the new configuration.
public struct SourceEditorConfiguration: Equatable {
/// Configure the appearance of the editor. Font, theme, line height, etc.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@

import AppKit

/// A protocol that can be used to receive extra state change messages from ``SourceEditor``.
/// A protocol that can be used to receive extra state change messages from <doc:SourceEditor>.
///
/// These are used as a way to push messages up from underlying components into SwiftUI land without requiring passing
/// callbacks for each message to the ``SourceEditor`` initializer.
/// callbacks for each message to the
/// ``SourceEditor/init(_:language:configuration:state:highlightProviders:undoManager:coordinators:)`` initializer.
///
/// They're very useful for updating UI that is directly related to the state of the editor, such as the current
/// cursor position. For an example, see the ``CombineCoordinator`` class, which implements combine publishers for the
Expand Down