unison-cli-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.LSP.VFS

Synopsis

Documentation

usingVFS :: forall a. StateT VFS Lsp a -> Lsp a Source #

Some VFS combinators require Monad State, this provides it in a transactionally safe manner so we're sure we don't edit the same file in two different actions at the same time.

markFilesDirty :: (Foldable f, HasUri doc Uri) => f doc -> Lsp () Source #

Mark some files as needing to be checked.

markAllFilesDirty :: Lsp () Source #

Mark all files for re-checking.

We may want to do this when our names or perspective change.

identifierAtPosition :: Uri -> Position -> MaybeT Lsp Text Source #

Returns the name or symbol which the provided position is contained in.

identifierSplitAtPosition :: Uri -> Position -> MaybeT Lsp (Text, Text) Source #

Returns the prefix and suffix of the symbol which the provided position is contained in.

completionPrefix :: Uri -> Position -> MaybeT Lsp (Range, Text) Source #

Returns the prefix of the symbol at the provided location, and the range that prefix spans.

lspOpenFile :: TNotificationMessage 'Method_TextDocumentDidOpen -> Lsp () Source #

lspCloseFile :: TNotificationMessage 'Method_TextDocumentDidClose -> Lsp () Source #

lspChangeFile :: TNotificationMessage 'Method_TextDocumentDidChange -> Lsp () Source #