Documentation
¶
Overview ¶
Package lsp adapts the shared compiler and language services to the Language Server Protocol. Protocol transport remains separate from project discovery.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
Mode string
Version string
Units []compiler.SourceUnit
CompilerOptions compiler.Options
ExcludedRoots []string
IncludedFiles []string
ResolveUnit UnitResolver
ResolveWorkspace WorkspaceResolver
// BackgroundDiagnostics keeps full-project analysis off the JSON-RPC
// request path. Interactive editor transports should enable it; direct
// adapters and focused tests may keep synchronous diagnostics.
BackgroundDiagnostics bool
Input io.Reader
Output io.Writer
}
type UnitResolver ¶
type UnitResolver func(filename string, source []byte) (compiler.SourceUnit, error)
type WorkspaceResolver ¶ added in v0.2.29
type WorkspaceResolver func(overlays map[string][]byte) ([]compiler.SourceUnit, error)
WorkspaceResolver rebuilds a complete workspace snapshot. Open document contents are keyed by clean absolute filenames and take precedence over filesystem contents when the adapter loads the snapshot.
Click to show internal directories.
Click to hide internal directories.