server

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2025 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientInfoExtras

type ClientInfoExtras struct {
	ClientName    string `json:"client_name"`
	ClientSession string `json:"client_session"`
}

type DockerLanguageServerCapabilities

type DockerLanguageServerCapabilities struct {
	Commands         []string         `json:"commands"`
	ClientInfoExtras ClientInfoExtras `json:"clientInfoExtras"`
}

type ExperimentalCapabilities

type ExperimentalCapabilities struct {
	Capabilities DockerLanguageServerCapabilities `json:"dockerLanguageServerCapabilities"`
}

type LanguageClient

type LanguageClient struct {
	// contains filtered or unexported fields
}

LanguageClient exposes JSON-RPC notifications and requests that are sent from the server to the client. Notifications can be sent freely but requests should be done in its own goroutine. Requests must not be sent from within an existing JSON-RPC notification or request handler. This is because the handling code is single-threaded and is expected to return to handle future messages. If a request is sent then the handler would never be able to process the response.

func (*LanguageClient) PublishDiagnostics

func (c *LanguageClient) PublishDiagnostics(ctx context.Context, params protocol.PublishDiagnosticsParams)

func (*LanguageClient) RegisterCapability

func (c *LanguageClient) RegisterCapability(ctx context.Context, params protocol.RegistrationParams)

RegisterCapability sends the client/registerCapability request from the server to the client to dynamically register capabilities.

func (*LanguageClient) ShowDocumentRequest

func (c *LanguageClient) ShowDocumentRequest(ctx context.Context, params protocol.ShowDocumentParams, result *protocol.ShowDocumentResult)

func (*LanguageClient) ShowMessage

func (c *LanguageClient) ShowMessage(ctx context.Context, params protocol.ShowMessageParams)

func (*LanguageClient) ShowMessageRequest

func (c *LanguageClient) ShowMessageRequest(ctx context.Context, params protocol.ShowMessageRequestParams, result *protocol.MessageActionItem)

func (*LanguageClient) WorkspaceCodeLensRefresh

func (c *LanguageClient) WorkspaceCodeLensRefresh(ctx context.Context)

func (*LanguageClient) WorkspaceConfiguration

func (c *LanguageClient) WorkspaceConfiguration(ctx context.Context, params protocol.ConfigurationParams, configurations *[]configuration.Configuration)

func (*LanguageClient) WorkspaceSemanticTokensRefresh

func (c *LanguageClient) WorkspaceSemanticTokensRefresh(ctx context.Context)

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(docManager *document.Manager) *Server

func (*Server) Enqueue

func (s *Server) Enqueue(event string, properties map[string]any)

func (*Server) FetchConfigurations

func (s *Server) FetchConfigurations(scopes []protocol.DocumentUri)

func (*Server) FetchUnscopedConfiguration

func (s *Server) FetchUnscopedConfiguration()

func (*Server) Initialize

func (s *Server) Initialize(ctx *glsp.Context, params *protocol.InitializeParams) (any, error)

func (*Server) Initialized

func (s *Server) Initialized(context *glsp.Context, params *protocol.InitializedParams) error

func (*Server) RunStdio

func (s *Server) RunStdio() error

func (*Server) RunTCP

func (s *Server) RunTCP(address string) error

func (*Server) ServeStream

func (s *Server) ServeStream(stream io.ReadWriteCloser)

ServeStream is only intended to be used for the tests.

func (*Server) StartBackgrondProcesses

func (s *Server) StartBackgrondProcesses(ctx context.Context)

func (*Server) TextDocumentCodeAction

func (s *Server) TextDocumentCodeAction(ctx *glsp.Context, params *protocol.CodeActionParams) (any, error)

func (*Server) TextDocumentCodeLens

func (s *Server) TextDocumentCodeLens(ctx *glsp.Context, params *protocol.CodeLensParams) ([]protocol.CodeLens, error)

func (*Server) TextDocumentCompletion

func (s *Server) TextDocumentCompletion(ctx *glsp.Context, params *protocol.CompletionParams) (any, error)

func (*Server) TextDocumentDefinition

func (s *Server) TextDocumentDefinition(ctx *glsp.Context, params *protocol.DefinitionParams) (any, error)

func (*Server) TextDocumentDidChange

func (s *Server) TextDocumentDidChange(ctx *glsp.Context, params *protocol.DidChangeTextDocumentParams) error

func (*Server) TextDocumentDidClose

func (s *Server) TextDocumentDidClose(ctx *glsp.Context, params *protocol.DidCloseTextDocumentParams) error

func (*Server) TextDocumentDidOpen

func (s *Server) TextDocumentDidOpen(ctx *glsp.Context, params *protocol.DidOpenTextDocumentParams) error

func (*Server) TextDocumentDocumentHighlight

func (s *Server) TextDocumentDocumentHighlight(ctx *glsp.Context, params *protocol.DocumentHighlightParams) ([]protocol.DocumentHighlight, error)
func (s *Server) TextDocumentDocumentLink(ctx *glsp.Context, params *protocol.DocumentLinkParams) ([]protocol.DocumentLink, error)

func (*Server) TextDocumentDocumentSymbol

func (s *Server) TextDocumentDocumentSymbol(ctx *glsp.Context, params *protocol.DocumentSymbolParams) (any, error)

func (*Server) TextDocumentFormatting

func (s *Server) TextDocumentFormatting(ctx *glsp.Context, params *protocol.DocumentFormattingParams) ([]protocol.TextEdit, error)

func (*Server) TextDocumentHover

func (s *Server) TextDocumentHover(ctx *glsp.Context, params *protocol.HoverParams) (*protocol.Hover, error)

func (*Server) TextDocumentInlayHint

func (s *Server) TextDocumentInlayHint(ctx *glsp.Context, params *protocol.InlayHintParams) (any, error)

func (*Server) TextDocumentInlineCompletion

func (s *Server) TextDocumentInlineCompletion(ctx *glsp.Context, params *protocol.InlineCompletionParams) (any, error)

func (*Server) TextDocumentSemanticTokensFull

func (s *Server) TextDocumentSemanticTokensFull(ctx *glsp.Context, params *protocol.SemanticTokensParams) (*protocol.SemanticTokens, error)

func (*Server) WorkspaceDidChangeConfiguration

func (s *Server) WorkspaceDidChangeConfiguration(ctx *glsp.Context, params *protocol.DidChangeConfigurationParams) error

func (*Server) WorkspaceExecuteCommand

func (s *Server) WorkspaceExecuteCommand(context *glsp.Context, params *protocol.ExecuteCommandParams) (any, error)

func (*Server) WorkspaceFolders

func (s *Server) WorkspaceFolders() []string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL