Documentation
¶
Overview ¶
Package ulspdaemon implements the ulsp-daemon business logic.
Package ulspdaemon implements the ulsp-daemon business logic.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller interface {
// LSP Methods defined per protocol.
Initialize(ctx context.Context, params *protocol.InitializeParams) (*protocol.InitializeResult, error)
Initialized(ctx context.Context, params *protocol.InitializedParams) (err error)
Shutdown(ctx context.Context) (err error)
Exit(ctx context.Context) error
// Document related methods.
DidChange(ctx context.Context, params *protocol.DidChangeTextDocumentParams) error
DidChangeWatchedFiles(ctx context.Context, params *protocol.DidChangeWatchedFilesParams) error
DidOpen(ctx context.Context, params *protocol.DidOpenTextDocumentParams) error
DidClose(ctx context.Context, params *protocol.DidCloseTextDocumentParams) error
WillSave(ctx context.Context, params *protocol.WillSaveTextDocumentParams) error
WillSaveWaitUntil(ctx context.Context, params *protocol.WillSaveTextDocumentParams) ([]protocol.TextEdit, error)
DidSave(ctx context.Context, params *protocol.DidSaveTextDocumentParams) error
WillRenameFiles(ctx context.Context, params *protocol.RenameFilesParams) (*protocol.WorkspaceEdit, error)
DidRenameFiles(ctx context.Context, params *protocol.RenameFilesParams) error
WillCreateFiles(ctx context.Context, params *protocol.CreateFilesParams) (*protocol.WorkspaceEdit, error)
DidCreateFiles(ctx context.Context, params *protocol.CreateFilesParams) error
WillDeleteFiles(ctx context.Context, params *protocol.DeleteFilesParams) (*protocol.WorkspaceEdit, error)
DidDeleteFiles(ctx context.Context, params *protocol.DeleteFilesParams) error
// Codeintel related methods.
CodeAction(ctx context.Context, params *protocol.CodeActionParams) ([]protocol.CodeAction, error)
CodeLens(ctx context.Context, params *protocol.CodeLensParams) (result []protocol.CodeLens, err error)
CodeLensRefresh(ctx context.Context) (err error)
CodeLensResolve(ctx context.Context, params *protocol.CodeLens) (result *protocol.CodeLens, err error)
GotoDeclaration(ctx context.Context, params *protocol.DeclarationParams) (result []protocol.LocationLink, err error)
GotoDefinition(ctx context.Context, params *protocol.DefinitionParams) (result []protocol.LocationLink, err error)
GotoTypeDefinition(ctx context.Context, params *protocol.TypeDefinitionParams) (result []protocol.LocationLink, err error)
GotoImplementation(ctx context.Context, params *protocol.ImplementationParams) (result []protocol.LocationLink, err error)
References(ctx context.Context, params *protocol.ReferenceParams) (result []protocol.Location, err error)
Hover(ctx context.Context, params *protocol.HoverParams) (result *protocol.Hover, err error)
DocumentSymbol(ctx context.Context, params *protocol.DocumentSymbolParams) (result []protocol.DocumentSymbol, err error)
// Workspace related methods.
ExecuteCommand(ctx context.Context, params *protocol.ExecuteCommandParams) (interface{}, error)
// Window related methods.
WorkDoneProgressCancel(ctx context.Context, params *protocol.WorkDoneProgressCancelParams) error
// Custom methods for use within this service.
RequestFullShutdown(ctx context.Context) error
InitSession(ctx context.Context, conn *jsonrpc2.Conn) (uuid.UUID, error)
EndSession(ctx context.Context, uuid uuid.UUID) error
}
Controller orchestrates the business logic for each request.
func New ¶
func New(p Params) (Controller, error)
New constructs a new top-level controller for the service.
type Params ¶
type Params struct {
fx.In
Shutdowner fx.Shutdowner
Sessions session.Repository
IdeGateway ideclient.Gateway
Logger *zap.SugaredLogger
Config config.Provider
FS fs.UlspFS
Executor executor.Executor
WorkspaceUtils workspaceutils.WorkspaceUtils
PluginDiagnostics diagnostics.Controller
PluginDocSync docsync.Controller
PluginQuickActions quickactions.Controller
PluginScip scip.Controller
PluginUserGuidance userguidance.Controller
PluginJDK jdk.Controller
PluginIndexer indexer.Controller
PluginScalaAssist scalaassist.Controller
}
Params are inbound parameters to initialize a new controller.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.