Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- usingVFS :: forall a. StateT VFS Lsp a -> Lsp a
- getVirtualFile :: Uri -> MaybeT Lsp VirtualFile
- getFileContents :: Uri -> MaybeT Lsp (FileVersion, Text)
- vfsLogger :: LogAction (StateT VFS Lsp) (WithSeverity VfsLog)
- markFilesDirty :: (Foldable f, HasUri doc Uri) => f doc -> Lsp ()
- markAllFilesDirty :: Lsp ()
- identifierAtPosition :: Uri -> Position -> MaybeT Lsp Text
- identifierSplitAtPosition :: Uri -> Position -> MaybeT Lsp (Text, Text)
- completionPrefix :: Uri -> Position -> MaybeT Lsp (Range, Text)
- lspOpenFile :: TNotificationMessage 'Method_TextDocumentDidOpen -> Lsp ()
- lspCloseFile :: TNotificationMessage 'Method_TextDocumentDidClose -> Lsp ()
- lspChangeFile :: TNotificationMessage 'Method_TextDocumentDidChange -> Lsp ()
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.
getVirtualFile :: Uri -> MaybeT Lsp VirtualFile Source #
getFileContents :: Uri -> MaybeT Lsp (FileVersion, Text) Source #
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 #