haskell-lsp-0.15.0.0: Haskell library for the Microsoft Language Server Protocol

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.LSP.VFS

Contents

Description

Handles the Language.Haskell.LSP.Types.TextDocumentDidChange / Language.Haskell.LSP.Types.TextDocumentDidOpen / Language.Haskell.LSP.Types.TextDocumentDidClose messages to keep an in-memory filesystem of the current client workspace. The server can access and edit files in the client workspace by operating on the VFS in LspFuncs.

Synopsis

Documentation

data VirtualFile Source #

Constructors

VirtualFile 
Instances
Show VirtualFile Source # 
Instance details

Defined in Language.Haskell.LSP.VFS

manipulating the file contents

data PosPrefixInfo Source #

Describes the line at the current cursor position

Constructors

PosPrefixInfo 

Fields

  • fullLine :: Text

    The full contents of the line the cursor is at

  • prefixModule :: Text

    If any, the module name that was typed right before the cursor position. For example, if the user has typed "Data.Maybe.from", then this property will be Data.Maybe

  • prefixText :: Text

    The word right before the cursor position, after removing the module part. For example if the user has typed "Data.Maybe.from", then this property will be "from"

  • cursorPos :: Position

    The cursor position

for tests

applyChanges :: Rope -> [TextDocumentContentChangeEvent] -> Rope Source #

Apply the list of changes. Changes should be applied in the order that they are received from the client.