unison-cli-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.LSP.Types

Synopsis

Documentation

newtype Lsp a Source #

A custom LSP monad wrapper so we can provide our own environment.

Constructors

Lsp 

Fields

Instances

Instances details
MonadIO Lsp Source # 
Instance details

Defined in Unison.LSP.Types

Methods

liftIO :: IO a -> Lsp a #

Applicative Lsp Source # 
Instance details

Defined in Unison.LSP.Types

Methods

pure :: a -> Lsp a #

(<*>) :: Lsp (a -> b) -> Lsp a -> Lsp b #

liftA2 :: (a -> b -> c) -> Lsp a -> Lsp b -> Lsp c #

(*>) :: Lsp a -> Lsp b -> Lsp b #

(<*) :: Lsp a -> Lsp b -> Lsp a #

Functor Lsp Source # 
Instance details

Defined in Unison.LSP.Types

Methods

fmap :: (a -> b) -> Lsp a -> Lsp b #

(<$) :: a -> Lsp b -> Lsp a #

Monad Lsp Source # 
Instance details

Defined in Unison.LSP.Types

Methods

(>>=) :: Lsp a -> (a -> Lsp b) -> Lsp b #

(>>) :: Lsp a -> Lsp b -> Lsp b #

return :: a -> Lsp a #

MonadUnliftIO Lsp Source # 
Instance details

Defined in Unison.LSP.Types

Methods

withRunInIO :: ((forall a. Lsp a -> IO a) -> IO b) -> Lsp b #

MonadLsp Config Lsp Source # 
Instance details

Defined in Unison.LSP.Types

MonadReader Env Lsp Source # 
Instance details

Defined in Unison.LSP.Types

Methods

ask :: Lsp Env #

local :: (Env -> Env) -> Lsp a -> Lsp a #

reader :: (Env -> a) -> Lsp a #

logInfo :: Text -> Lsp () Source #

Log an info message to the client's LSP log.

logError :: Text -> Lsp () Source #

Log an error message to the client's LSP log, this will be shown to the user in most LSP implementations.

newtype CompletionTree Source #

A suffix tree over path segments of name completions. see namesToCompletionTree for more on how this is built and the invariants it should have.

type FileVersion = Int32 Source #

A monotonically increasing file version tracked by the lsp client.

data Config Source #

Constructors

Config 

Instances

Instances details
FromJSON Config Source # 
Instance details

Defined in Unison.LSP.Types

ToJSON Config Source # 
Instance details

Defined in Unison.LSP.Types

Show Config Source # 
Instance details

Defined in Unison.LSP.Types

MonadLsp Config Lsp Source # 
Instance details

Defined in Unison.LSP.Types

lspBackend :: Backend IO a -> Lsp (Either BackendError a) Source #

Lift a backend computation into the Lsp monad.

sendNotification :: forall (m :: Method 'ServerToClient 'Notification). TMessage m ~ TNotificationMessage m => TNotificationMessage m -> Lsp () Source #

data RangedCodeAction Source #

Constructors

RangedCodeAction 

Fields

Instances

Instances details
Show RangedCodeAction Source # 
Instance details

Defined in Unison.LSP.Types

Eq RangedCodeAction Source # 
Instance details

Defined in Unison.LSP.Types

HasCodeAction RangedCodeAction CodeAction Source # 
Instance details

Defined in Unison.LSP.Types

Methods

codeAction :: Lens' RangedCodeAction CodeAction

rangedCodeAction :: Text -> [Diagnostic] -> [Range] -> RangedCodeAction Source #

includeEdits :: Uri -> Text -> [Range] -> RangedCodeAction -> RangedCodeAction Source #

Provided ranges must not intersect.