Package
The Pony Language Server¶
This package implements the (Language Server Protocol Spec v3.17](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/) for Pony.
It is using the ast
library to parse and type-check pony projects opened in
the editor, using the same code as the official compiler ponyc
, so the
diagnostics and code analysis provided will always be in sync with what the
ponyc
compiler provides.
Package Contents¶
lsp
¶
This package contains all the code supporting the protocol, data structures and types from the spec, the communication
with a language client. The LanguageServer
is
controlling which requests and notifications are supported and dispatches to the
actor handling the workspace for the given request.
Channel
defining the necessary channel behaviours andStdio
being the implementation for Standard-IO based communication.PonyCompiler
as an actor whose main job is to expose theast
lib functionality of parsing and typechecking a pony project and to linearize all requests as the underlying libponyc is not 100% thread-safe.
lsp/workspace
¶
This package contains the actual logic applied to handling a single pony
project. The WorkspaceManager
actor handles
requests and notifications, starts the parsing and typechecking process and
receives its results. It builds up the necessary state needed for answering LSP
client requests in the PackageState
and
DocumentState
classes.
Public Types¶
- class BaseProtocol
- trait Channel
- interface CompilerNotify
- primitive Debug
- class Diagnostic
- class DiagnosticRelatedInformation
- primitive DiagnosticSeverities
- class DocumentSymbol
- primitive DocumentSymbols
- primitive Err
- primitive ErrorCodes
- primitive Info
- class InputNotifier
- primitive InvalidContentLength
- primitive InvalidJson
- class InvalidMessage
- actor LanguageServer
- class Locator
- primitive Log
- class LspLocation
- class LspPosition
- class LspPositionRange
- actor Main
- trait Message
- type MessageType
- primitive NeedMore
- primitive NoContentLength
- class Notification
- interface Notifier
- type ParseError
- actor PonyCompiler
- type ReceivingMode
- primitive ReceivingModeContent
- primitive ReceivingModeHeader
- type RequestId
- class RequestMessage
- class ResponseError
- class ResponseMessage
- class ServerOptions
- actor Stdio
- primitive SymbolKinds
- primitive SymbolTags
- primitive Uris
- primitive Warning