lsp

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

code gen by methods_gen_test.go, do not edit!

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStdio

func NewStdio() jsonrpc.ReaderWriter

Types

type Methods

type Methods struct {
	Opt Options
	// contains filtered or unexported fields
}

func (*Methods) GetMethods

func (m *Methods) GetMethods() []*jsonrpc.MethodInfo

func (*Methods) OnCodeActionResolve

func (m *Methods) OnCodeActionResolve(f func(ctx context.Context, req *defines.CodeAction) (result *defines.CodeAction, err error))

func (*Methods) OnCodeActionWithSliceCodeAction

func (m *Methods) OnCodeActionWithSliceCodeAction(f func(ctx context.Context, req *defines.CodeActionParams) (result *[]defines.CodeAction, err error))

func (*Methods) OnCodeActionWithSliceCommand

func (m *Methods) OnCodeActionWithSliceCommand(f func(ctx context.Context, req *defines.CodeActionParams) (result *[]defines.Command, err error))

func (*Methods) OnCodeLens

func (m *Methods) OnCodeLens(f func(ctx context.Context, req *defines.CodeLensParams) (result *[]defines.CodeLens, err error))

func (*Methods) OnCodeLensResolve

func (m *Methods) OnCodeLensResolve(f func(ctx context.Context, req *defines.CodeLens) (result *defines.CodeLens, err error))

func (*Methods) OnColorPresentation

func (m *Methods) OnColorPresentation(f func(ctx context.Context, req *defines.ColorPresentationParams) (result *[]defines.ColorPresentation, err error))

func (*Methods) OnCompletion

func (m *Methods) OnCompletion(f func(ctx context.Context, req *defines.CompletionParams) (result *[]defines.CompletionItem, err error))

func (*Methods) OnCompletionResolve

func (m *Methods) OnCompletionResolve(f func(ctx context.Context, req *defines.CompletionItem) (result *defines.CompletionItem, err error))

func (*Methods) OnDeclaration

func (m *Methods) OnDeclaration(f func(ctx context.Context, req *defines.DeclarationParams) (result *[]defines.LocationLink, err error))

func (*Methods) OnDefinition

func (m *Methods) OnDefinition(f func(ctx context.Context, req *defines.DefinitionParams) (result *[]defines.LocationLink, err error))

func (*Methods) OnDidChangeConfiguration

func (m *Methods) OnDidChangeConfiguration(f func(ctx context.Context, req *defines.DidChangeConfigurationParams) (err error))

func (*Methods) OnDidChangeTextDocument

func (m *Methods) OnDidChangeTextDocument(f func(ctx context.Context, req *defines.DidChangeTextDocumentParams) (err error))

func (*Methods) OnDidChangeWatchedFiles

func (m *Methods) OnDidChangeWatchedFiles(f func(ctx context.Context, req *defines.DidChangeWatchedFilesParams) (err error))

func (*Methods) OnDidCloseTextDocument

func (m *Methods) OnDidCloseTextDocument(f func(ctx context.Context, req *defines.DidCloseTextDocumentParams) (err error))

func (*Methods) OnDidOpenTextDocument

func (m *Methods) OnDidOpenTextDocument(f func(ctx context.Context, req *defines.DidOpenTextDocumentParams) (err error))

func (*Methods) OnDidSaveTextDocument

func (m *Methods) OnDidSaveTextDocument(f func(ctx context.Context, req *defines.DidSaveTextDocumentParams) (err error))

func (*Methods) OnDocumentColor

func (m *Methods) OnDocumentColor(f func(ctx context.Context, req *defines.DocumentColorParams) (result *[]defines.ColorInformation, err error))

func (*Methods) OnDocumentFormatting

func (m *Methods) OnDocumentFormatting(f func(ctx context.Context, req *defines.DocumentFormattingParams) (result *[]defines.TextEdit, err error))

func (*Methods) OnDocumentHighlight

func (m *Methods) OnDocumentHighlight(f func(ctx context.Context, req *defines.DocumentHighlightParams) (result *[]defines.DocumentHighlight, err error))

func (*Methods) OnDocumentLinkResolve

func (m *Methods) OnDocumentLinkResolve(f func(ctx context.Context, req *defines.DocumentLink) (result *defines.DocumentLink, err error))
func (m *Methods) OnDocumentLinks(f func(ctx context.Context, req *defines.DocumentLinkParams) (result *[]defines.DocumentLink, err error))

func (*Methods) OnDocumentOnTypeFormatting

func (m *Methods) OnDocumentOnTypeFormatting(f func(ctx context.Context, req *defines.DocumentOnTypeFormattingParams) (result *[]defines.TextEdit, err error))

func (*Methods) OnDocumentRangeFormatting

func (m *Methods) OnDocumentRangeFormatting(f func(ctx context.Context, req *defines.DocumentRangeFormattingParams) (result *[]defines.TextEdit, err error))

func (*Methods) OnDocumentSymbolWithSliceDocumentSymbol

func (m *Methods) OnDocumentSymbolWithSliceDocumentSymbol(f func(ctx context.Context, req *defines.DocumentSymbolParams) (result *[]defines.DocumentSymbol, err error))

func (*Methods) OnDocumentSymbolWithSliceSymbolInformation

func (m *Methods) OnDocumentSymbolWithSliceSymbolInformation(f func(ctx context.Context, req *defines.DocumentSymbolParams) (result *[]defines.SymbolInformation, err error))

func (*Methods) OnExecuteCommand

func (m *Methods) OnExecuteCommand(f func(ctx context.Context, req *defines.ExecuteCommandParams) (result *interface{}, err error))

func (*Methods) OnExit

func (m *Methods) OnExit(f func(ctx context.Context, req *interface{}) (err error))

func (*Methods) OnFoldingRanges

func (m *Methods) OnFoldingRanges(f func(ctx context.Context, req *defines.FoldingRangeParams) (result *[]defines.FoldingRange, err error))

func (*Methods) OnHover

func (m *Methods) OnHover(f func(ctx context.Context, req *defines.HoverParams) (result *defines.Hover, err error))

func (*Methods) OnImplementation

func (m *Methods) OnImplementation(f func(ctx context.Context, req *defines.ImplementationParams) (result *[]defines.LocationLink, err error))

func (*Methods) OnInitialize

func (m *Methods) OnInitialize(f func(ctx context.Context, req *defines.InitializeParams) (result *defines.InitializeResult, err *defines.InitializeError))

func (*Methods) OnInitialized

func (m *Methods) OnInitialized(f func(ctx context.Context, req *defines.InitializeParams) (err error))

func (*Methods) OnPrepareRename

func (m *Methods) OnPrepareRename(f func(ctx context.Context, req *defines.PrepareRenameParams) (result *defines.Range, err error))

func (*Methods) OnReferences

func (m *Methods) OnReferences(f func(ctx context.Context, req *defines.ReferenceParams) (result *[]defines.Location, err error))

func (*Methods) OnRenameRequest

func (m *Methods) OnRenameRequest(f func(ctx context.Context, req *defines.RenameParams) (result *defines.WorkspaceEdit, err error))

func (*Methods) OnSelectionRanges

func (m *Methods) OnSelectionRanges(f func(ctx context.Context, req *defines.SelectionRangeParams) (result *[]defines.SelectionRange, err error))

func (*Methods) OnShutdown

func (m *Methods) OnShutdown(f func(ctx context.Context, req *interface{}) (err error))

func (*Methods) OnSignatureHelp

func (m *Methods) OnSignatureHelp(f func(ctx context.Context, req *defines.SignatureHelpParams) (result *defines.SignatureHelp, err error))

func (*Methods) OnTypeDefinition

func (m *Methods) OnTypeDefinition(f func(ctx context.Context, req *defines.TypeDefinitionParams) (result *[]defines.LocationLink, err error))

func (*Methods) OnWillSaveTextDocument

func (m *Methods) OnWillSaveTextDocument(f func(ctx context.Context, req *defines.WillSaveTextDocumentParams) (err error))

func (*Methods) OnWorkspaceSymbol

func (m *Methods) OnWorkspaceSymbol(f func(ctx context.Context, req *defines.WorkspaceSymbolParams) (result *[]defines.SymbolInformation, err error))

type Options

type Options struct {
	// if Network is null, will use stdio
	Network                          string
	Address                          string
	TextDocumentSync                 defines.TextDocumentSyncKind
	CompletionProvider               *defines.CompletionOptions
	HoverProvider                    *defines.HoverOptions
	SignatureHelpProvider            *defines.SignatureHelpOptions
	DeclarationProvider              *defines.DeclarationOptions
	DefinitionProvider               *defines.DefinitionOptions
	TypeDefinitionProvider           *defines.TypeDefinitionOptions
	ImplementationProvider           *defines.ImplementationOptions
	ReferencesProvider               *defines.ReferenceOptions
	DocumentHighlightProvider        *defines.DocumentHighlightOptions
	DocumentSymbolProvider           *defines.DocumentSymbolOptions
	CodeActionProvider               *defines.CodeActionOptions
	CodeLensProvider                 *defines.CodeLensOptions
	DocumentLinkProvider             *defines.DocumentLinkOptions
	ColorProvider                    *defines.DocumentColorOptions
	ColorWithRegistrationProvider    *defines.DocumentColorRegistrationOptions
	WorkspaceSymbolProvider          *defines.WorkspaceSymbolOptions
	DocumentFormattingProvider       *defines.DocumentFormattingOptions
	DocumentRangeFormattingProvider  *defines.DocumentRangeFormattingOptions
	DocumentOnTypeFormattingProvider *defines.DocumentOnTypeFormattingOptions
	RenameProvider                   *defines.RenameOptions
	FoldingRangeProvider             *defines.FoldingRangeOptions
	SelectionRangeProvider           *defines.SelectionRangeOptions
	ExecuteCommandProvider           *defines.ExecuteCommandOptions
	CallHierarchyProvider            *defines.CallHierarchyOptions
	LinkProvider                     *defines.DocumentLinkOptions
	SemanticTokensProvider           *defines.SemanticTokensOptions
	Workspace                        *struct {
		FileOperations *defines.FileOperationOptions
	}
	MonikerProvider *defines.MonikerOptions
	Experimental    interface{}
}

type Server

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

func NewServer

func NewServer(opt *Options) *Server

func (*Server) PublishDiagnostics added in v0.1.1

func (s *Server) PublishDiagnostics(params defines.PublishDiagnosticsParams) error

func (*Server) PublishProgress added in v0.1.5

func (s *Server) PublishProgress(params jsonrpc.ProgressParams) error

func (*Server) Run

func (s *Server) Run()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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