WorkspaceFile

Represents a single document tracked by a Workspace.

Mirrors upstream @codemirror/lsp-client's WorkspaceFile. It holds the file's identity, the editor session bound to it, the document text last synchronized to the server, the synced version, and any pending changes that have not yet been flushed via Workspace.syncFiles.

Parameters

uri

The document URI, as understood by the language server.

languageId

The LSP language identifier (e.g. "kotlin", "json").

session

The editor session displaying this file, if any.

Properties

Link copied to clipboard
var doc: Text

The document text as the server last saw it.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val uri: String
Link copied to clipboard

The document version last synchronized with the server. Incremented each time changes are flushed to the server.

Functions

Link copied to clipboard
fun getText(): String?

Get the current document text, or null if no session is attached.