Creates a new D document at the given document URI, with version 0 and no text.
Creates a new document at the given document URI, with the given version and language and creates a copy of the text to use.
Converts a byte offset to an LSP offset.
Converts a byte offset to a line/column position.
Returns how a line is terminated at the given 0-based line number.
Returns the text of a line at the given position.
Returns the text of a line starting at line 0.
Returns the line text which is only in this scope if text isn't modified
Returns the line text which is only in this scope if text isn't modified
Returns a byte offset range as [start, end] of the given 0-based line number.
Converts a line/column byte offset to a line/column position.
Returns the position at "end" starting from the given "src" position which is assumed to be at byte "start" Faster to quickly calculate nearby positions of known byte positions. Falls back to bytesToPosition if end is before start.
Converts an LSP offset to a byte offset for using for example in array slicing.
Converts an LSP offset to a line/column position.
Converts a line/column position to a byte offset.
Converts a line/column position to an LSP offset.
Returns a read-only view of the text. The text may however be changed by other operations, so this slice should be used directly and not after any context yield or API call potentially modifying the data.
Sets the content of this document to the given content. Copies the data from newContent into this text buffer.
Returns the word range at a given line/column position.
Returns the word range at a given byte position.
Creates a document with no URI and no language ID and copies the content into the text buffer using setContent.
The language ID as reported by the client. Should not be changed.
The URI of this document. Should not be changed.
The document version as reported by the client. Should not be changed.
in-memory representation of a file at any given URI. Not thread-safe.