TextDocument

class TextDocument
Members defined in TextDocument (13 members)

language_id

R

line_count

R

text

R

url

R

version

R

create_mt

Create an empty TextDocument for multi-threaded applications

create_st

Create an empty TextDocument for single-threaded applications

get_text

offset_at

update

utf16_position_at

utf32_position_at

utf8_position_at

Attributes

property language_id: str
property line_count: int
property text: str
property url: syside.Url
property version: int

Methods

static create_mt() syside.SharedMutex[syside.TextDocument]

Create an empty TextDocument for multi-threaded applications

static create_mt(url: syside.Url, language: str, content: str, version: int = 0) syside.SharedMutex[syside.TextDocument]
static create_st() syside.SharedMutex[syside.TextDocument]

Create an empty TextDocument for single-threaded applications

static create_st(url: syside.Url, language: str, content: str, version: int = 0) syside.SharedMutex[syside.TextDocument]
get_text(range: syside.RangeUtf8) str
get_text(range: syside.RangeUtf16) str
get_text(range: syside.RangeUtf32) str
offset_at(position: syside.PositionUtf8) int
offset_at(position: syside.PositionUtf16) int
offset_at(position: syside.PositionUtf32) int
update(changes: Sequence[syside.TextDocumentEditUtf8], version: int | None = None) None
utf16_position_at(offset: int) syside.PositionUtf16
utf32_position_at(offset: int) syside.PositionUtf32
utf8_position_at(offset: int) syside.PositionUtf8
Used in