Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Lsp a = Lsp {}
- logInfo :: Text -> Lsp ()
- logError :: Text -> Lsp ()
- data Env = Env {
- lspContext :: LanguageContextEnv Config
- codebase :: Codebase IO Symbol Ann
- currentNamesCache :: IO Names
- ppedCache :: IO PrettyPrintEnvDecl
- nameSearchCache :: IO (NameSearch Transaction)
- currentProjectPathCache :: IO ProjectPath
- vfsVar :: MVar VFS
- runtime :: Runtime Symbol
- checkedFilesVar :: TVar (Map Uri (TMVar FileAnalysis))
- dirtyFilesVar :: TVar (Set Uri)
- cancellationMapVar :: TVar (Map (Int32 |? Text) (IO ()))
- completionsVar :: TMVar CompletionTree
- scope :: Scope
- newtype CompletionTree = CompletionTree {
- unCompletionTree :: Cofree (Map NameSegment) (Set (Name, LabeledDependency))
- type FileVersion = Int32
- type LexedSource = (Text, [Token Lexeme])
- data TypeSignatureHint = TypeSignatureHint {}
- data FileAnalysis = FileAnalysis {
- fileUri :: Uri
- fileVersion :: FileVersion
- lexedSource :: LexedSource
- tokenMap :: IntervalMap Position Lexeme
- parsedFile :: Maybe (UnisonFile Symbol Ann)
- typecheckedFile :: Maybe (TypecheckedUnisonFile Symbol Ann)
- notes :: Seq (Note Symbol Ann)
- diagnostics :: IntervalMap Position [Diagnostic]
- codeActions :: IntervalMap Position [CodeAction]
- typeSignatureHints :: Map Symbol TypeSignatureHint
- fileSummary :: Maybe FileSummary
- getCurrentProjectPath :: Lsp ProjectPath
- getCodebaseCompletions :: Lsp CompletionTree
- currentPPED :: Lsp PrettyPrintEnvDecl
- getNameSearch :: Lsp (NameSearch Transaction)
- getCurrentNames :: Lsp Names
- data Config = Config {}
- defaultLSPConfig :: Config
- lspBackend :: Backend IO a -> Lsp (Either BackendError a)
- sendNotification :: forall (m :: Method 'ServerToClient 'Notification). TMessage m ~ TNotificationMessage m => TNotificationMessage m -> Lsp ()
- data RangedCodeAction = RangedCodeAction {
- _codeActionRanges :: [Range]
- _codeAction :: CodeAction
- rangedCodeAction :: Text -> [Diagnostic] -> [Range] -> RangedCodeAction
- includeEdits :: Uri -> Text -> [Range] -> RangedCodeAction -> RangedCodeAction
- getConfig :: Lsp Config
- setConfig :: Config -> Lsp ()
Documentation
A custom LSP monad wrapper so we can provide our own environment.
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.
Environment for the Lsp monad.
Env | |
|
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.
Instances
Monoid CompletionTree Source # | |
Defined in Unison.LSP.Types mappend :: CompletionTree -> CompletionTree -> CompletionTree # mconcat :: [CompletionTree] -> CompletionTree # | |
Semigroup CompletionTree Source # | |
Defined in Unison.LSP.Types (<>) :: CompletionTree -> CompletionTree -> CompletionTree # sconcat :: NonEmpty CompletionTree -> CompletionTree # stimes :: Integral b => b -> CompletionTree -> CompletionTree # | |
Show CompletionTree Source # | |
Defined in Unison.LSP.Types showsPrec :: Int -> CompletionTree -> ShowS # show :: CompletionTree -> String # showList :: [CompletionTree] -> ShowS # |
type FileVersion = Int32 Source #
A monotonically increasing file version tracked by the lsp client.
data TypeSignatureHint Source #
Instances
Show TypeSignatureHint Source # | |
Defined in Unison.LSP.Types showsPrec :: Int -> TypeSignatureHint -> ShowS # show :: TypeSignatureHint -> String # showList :: [TypeSignatureHint] -> ShowS # |
data FileAnalysis Source #
FileAnalysis | |
|
Instances
Show FileAnalysis Source # | |
Defined in Unison.LSP.Types showsPrec :: Int -> FileAnalysis -> ShowS # show :: FileAnalysis -> String # showList :: [FileAnalysis] -> ShowS # |
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 #
RangedCodeAction | |
|
Instances
Show RangedCodeAction Source # | |
Defined in Unison.LSP.Types showsPrec :: Int -> RangedCodeAction -> ShowS # show :: RangedCodeAction -> String # showList :: [RangedCodeAction] -> ShowS # | |
Eq RangedCodeAction Source # | |
Defined in Unison.LSP.Types (==) :: RangedCodeAction -> RangedCodeAction -> Bool # (/=) :: RangedCodeAction -> RangedCodeAction -> Bool # | |
HasCodeAction RangedCodeAction CodeAction Source # | |
Defined in Unison.LSP.Types codeAction :: Lens' RangedCodeAction CodeAction |
rangedCodeAction :: Text -> [Diagnostic] -> [Range] -> RangedCodeAction Source #
includeEdits :: Uri -> Text -> [Range] -> RangedCodeAction -> RangedCodeAction Source #
Provided ranges must not intersect.