Document Snapshot #
Equations
Instances For
Get text in a range
Equations
- One or more equations did not get rendered due to their size.
Instances For
VFS Messages #
Messages that the VFS actor can receive
- openDocument
(params : Protocol.Messages.DidOpenTextDocumentParams)
: VfsMsg
Open a new document
- closeDocument
(params : Protocol.Messages.DidCloseTextDocumentParams)
: VfsMsg
Close a document
- changeDocument
(params : Protocol.Messages.DidChangeTextDocumentParams)
: VfsMsg
Apply changes to a document
- getSnapshot
(uri : Protocol.Types.DocumentUri)
(replyTo : Channel.Oneshot (Option DocumentSnapshot))
: VfsMsg
Request a snapshot of a document
- getContent
(uri : Protocol.Types.DocumentUri)
(replyTo : Channel.Oneshot (Option String))
: VfsMsg
Request content of a document
- getLine
(uri : Protocol.Types.DocumentUri)
(line : Nat)
(replyTo : Channel.Oneshot (Option String))
: VfsMsg
Request a specific line
- getWordAt
(uri : Protocol.Types.DocumentUri)
(pos : Protocol.Types.Position)
(replyTo : Channel.Oneshot (Option String))
: VfsMsg
Request word at position
- positionToOffset
(uri : Protocol.Types.DocumentUri)
(pos : Protocol.Types.Position)
(replyTo : Channel.Oneshot (Option Nat))
: VfsMsg
Request position to offset conversion
- offsetToPosition
(uri : Protocol.Types.DocumentUri)
(offset : Nat)
(replyTo : Channel.Oneshot (Option Protocol.Types.Position))
: VfsMsg
Request offset to position conversion
- getOpenDocuments
(replyTo : Channel.Oneshot (List String))
: VfsMsg
Get list of open documents
- hasDocument
(uri : Protocol.Types.DocumentUri)
(replyTo : Channel.Oneshot Bool)
: VfsMsg
Check if document exists
- shutdown : VfsMsg
Shutdown the VFS actor
Instances For
VFS Actor State #
VFS Actor Reference #
Open a document (fire and forget)
Equations
- vfs.openDocument params = vfs.ref.send (Lapis.Concurrent.VfsActor.VfsMsg.openDocument params)
Instances For
Close a document (fire and forget)
Equations
- vfs.closeDocument params = vfs.ref.send (Lapis.Concurrent.VfsActor.VfsMsg.closeDocument params)
Instances For
Apply changes to a document (fire and forget)
Equations
- vfs.changeDocument params = vfs.ref.send (Lapis.Concurrent.VfsActor.VfsMsg.changeDocument params)
Instances For
Get a snapshot of a document (blocking request-response)
Equations
- vfs.getSnapshot uri = do let reply ← Lapis.Concurrent.Channel.Oneshot.new vfs.ref.send (Lapis.Concurrent.VfsActor.VfsMsg.getSnapshot uri reply) reply.recv
Instances For
Get document content
Equations
- vfs.getContent uri = do let reply ← Lapis.Concurrent.Channel.Oneshot.new vfs.ref.send (Lapis.Concurrent.VfsActor.VfsMsg.getContent uri reply) reply.recv
Instances For
Get a specific line
Equations
- vfs.getLine uri line = do let reply ← Lapis.Concurrent.Channel.Oneshot.new vfs.ref.send (Lapis.Concurrent.VfsActor.VfsMsg.getLine uri line reply) reply.recv
Instances For
Get word at position
Equations
- vfs.getWordAt uri pos = do let reply ← Lapis.Concurrent.Channel.Oneshot.new vfs.ref.send (Lapis.Concurrent.VfsActor.VfsMsg.getWordAt uri pos reply) reply.recv
Instances For
Convert position to byte offset
Equations
- vfs.positionToOffset uri pos = do let reply ← Lapis.Concurrent.Channel.Oneshot.new vfs.ref.send (Lapis.Concurrent.VfsActor.VfsMsg.positionToOffset uri pos reply) reply.recv
Instances For
Convert byte offset to position
Equations
- vfs.offsetToPosition uri offset = do let reply ← Lapis.Concurrent.Channel.Oneshot.new vfs.ref.send (Lapis.Concurrent.VfsActor.VfsMsg.offsetToPosition uri offset reply) reply.recv
Instances For
Get list of open document URIs
Equations
- vfs.getOpenDocuments = do let reply ← Lapis.Concurrent.Channel.Oneshot.new vfs.ref.send (Lapis.Concurrent.VfsActor.VfsMsg.getOpenDocuments reply) reply.recv
Instances For
Check if a document is open
Equations
- vfs.hasDocument uri = do let reply ← Lapis.Concurrent.Channel.Oneshot.new vfs.ref.send (Lapis.Concurrent.VfsActor.VfsMsg.hasDocument uri reply) reply.recv
Instances For
Request shutdown
Equations
Instances For
Helper Functions #
VFS Actor Implementation #
Spawn the VFS actor
Equations
- One or more equations did not get rendered due to their size.