Documentation
¶
Overview ¶
internal/types/position.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EditInfo ¶
type EditInfo struct {
StartIndex uint32 // Start byte of the edit
OldEndIndex uint32 // End byte of the old text
NewEndIndex uint32 // End byte of the new text
StartPosition sitter.Point // Start position (row, column)
OldEndPosition sitter.Point // Old end position
NewEndPosition sitter.Point // New end position
}
EditInfo encapsulates the information needed for tree-sitter's Edit function.
type HighlightRegion ¶
type HighlightRegion struct {
Start Position
End Position
Type HighlightType
}
HighlightRegion defines a text range with a specific highlight type.
type HighlightType ¶
type HighlightType string
HighlightType identifies the reason for highlighting.
const (
HighlightSearch HighlightType = "search"
)
type Position ¶
Position represents a cursor or text position within the buffer. Line is the 0-based line index. Col is the 0-based column (rune) index within the line. Using Rune index is important for future Unicode handling.
type StyledRange ¶
type StyledRange struct {
StartCol int // Rune column index (inclusive)
EndCol int // Rune column index (exclusive)
StyleName string // Semantic style name (e.g., "keyword", "comment", "string")
}
StyledRange represents a segment of text with an associated style name (for theming).
Click to show internal directories.
Click to hide internal directories.