dhall-lsp-server-1.1.2: Language Server Protocol (LSP) server for Dhall
Safe HaskellNone
LanguageHaskell2010

Dhall.LSP.Backend.Completion

Synopsis

Documentation

completionQueryAt :: Text -> Position -> (Text, Text) Source #

Given the cursor position construct the corresponding 'completion query' consisting of the leadup, i.e. text leading up to the word prefix that is to be completed, as well as the prefix that is to be completed.

data Completion Source #

A completion result, optionally annotated with type information.

Constructors

Completion 

completeLocalImport :: FilePath -> FilePath -> IO [Completion] Source #

Complete file names.

completeEnvironmentImport :: IO [Completion] Source #

Complete environment variables.

data CompletionContext Source #

A completion context, consisting of the (approximated) type-checking context. We need to substitute 'dependent lets' later so we keep their values around.

buildCompletionContext :: Expr Src Void -> CompletionContext Source #

Given a 'binders expression' (with arbitrarily many holes) construct the corresponding completion context.

completeFromContext :: CompletionContext -> [Completion] Source #

Complete identifiers from the given completion context.

completeProjections :: CompletionContext -> Expr Src Void -> [Completion] Source #

Complete union constructors and record projections.