lapce_editor_core library

Classes

Action
AppliedTransaction
Buffer
Mutable document state over the persistent rope.
BufferEditResult
CharBuffer
Dart adaptation of Floem's stack-backed single-character string.
Clipboard
ColPosition
Contents
Cursor
CursorMode
DeltaMap
DiffBoth<T>
DiffBothInfo
DiffBothLines
DiffExpand
DiffExpandAll
DiffExpandDown
DiffExpandUp
DiffLeft<T>
DiffLeftLines
DiffLines
DiffResult<T>
DiffRight<T>
DiffRightLines
EditConf
EditContents
FullLeChunkSearch
HistoryResult
IndentStyle
InsertCursorMode
InvalLines
LineEndingMatch
LinePosition
LineRange
LoneCrChunkSearch
MotionMode
Movement
NormalCursorMode
ParagraphCursor
Paragraph movement matching Floem's four-character boundary classifier.
Register
RegisterData
Revision
RopeTextBuffer
A persistent AVL rope. Replacements share unchanged nodes with the old value.
Selection
SelectionRegion
TextBuffer
TextOffset
A UTF-16 code-unit offset into an editor document.
TextPoint
TextRange
A half-open UTF-16 range: [start, end).
TextReplacement
Transaction
UndoContents
Utf8Offset
A UTF-8 byte offset used at parser and protocol boundaries.
VisualCursorMode
WordCursor
Stateful word navigator. Positions are UTF-16 offsets.

Functions

autoDetectIndentStyle(RopeTextBuffer document) IndentStyle?
charIsLineEnding(String character) bool
charIsWhitespace(String character) bool
classifyParagraphBoundary(ParagraphCharClassification beforePrevious, ParagraphCharClassification previous, ParagraphCharClassification next, ParagraphCharClassification afterNext) ParagraphBoundary
classifyWordBoundary(WordCharClassification previous, WordCharClassification next) WordBoundary
countSpacesFrom(RopeTextBuffer text, TextOffset offset) int
createIndentEdit(RopeTextBuffer buffer, TextOffset offset, String indent) → (Selection, String)
createOutdentEdit(RopeTextBuffer buffer, TextOffset offset, String indent) → (Selection, String)?
determineLineEnding(String text) LineEndingDetermination
determineLineEndingChunks(Iterable<String> chunks) LineEndingDetermination
Reproduces xi-rope's chunk-based detection: each chunk contributes the kind of its first newline, and different kinds across chunks are mixed.
expandDiffLines(List<DiffLines> lines, int line, DiffExpand expand, {required bool isRight}) → void
formatStartEnd(RopeTextBuffer buffer, TextRange range, {required bool isVertical, required bool firstNonBlank, required int count}) TextRange
getFirstSelectionAfter(Cursor cursor, RopeTextBuffer buffer, DeltaMap delta) Cursor?
hasUnmatchedPair(String line) bool
lineEndingOr(LineEndingDetermination determination, LineEnding fallback) LineEnding
matchingBracketGeneral(String character) String?
Dart strings are the shared representation for both Rust char and str.
matchingCharacter(String character) String?
Returns the bracket paired with character.
matchingPairDirection(String character) bool?
Whether character opens (true) or closes (false) a supported pair.
paragraphCharacterProperty(String character) ParagraphCharClassification
parseModes(String value) Set<Mode>
regionToRange(SelectionRegion region) TextRange
ropeDiff(String left, String right, {int? contextLines, bool isCurrent()?}) List<DiffLines>?
snapToSoftTab(RopeTextBuffer text, TextOffset offset, SnapDirection direction, int tabWidth) TextOffset
snapToSoftTabLineColumn(RopeTextBuffer text, int line, int column, SnapDirection direction, int tabWidth) int
snapToSoftTabLogic(RopeTextBuffer text, int offsetOrColumn, TextOffset lineStart, SnapDirection direction, int tabWidth) int
stringIsPairLeft(String value) bool
stringMatchingPair(String value) String?
wordCharacterProperty(String character) WordCharClassification

Exceptions / Errors

CharBufferTryFromError