codeaction

package
v0.0.0-...-df5614f Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMissingKeyError

func IsMissingKeyError(err error) bool

Types

type CodeActionsService

type CodeActionsService struct {
	IssuesProvider ide.IssueProvider
	// contains filtered or unexported fields
}

CodeActionsService is an application-layer service for handling code actions.

func NewService

func NewService(c *config.Config, provider ide.IssueProvider, fileWatcher dirtyFilesWatcher, notifier noti.Notifier, codeApiClient code.KhulnasoftCodeClient) *CodeActionsService

func (*CodeActionsService) GetCodeActions

func (c *CodeActionsService) GetCodeActions(params lsp.CodeActionParams) []lsp.CodeAction

func (*CodeActionsService) ResolveCodeAction

func (c *CodeActionsService) ResolveCodeAction(
	action lsp.CodeAction,
	server lsp.Server,
	authService khulnasoft.AuthenticationService,
	learnService learn.Service,
) (lsp.CodeAction, error)

type ResolveHandler

type ResolveHandler func(context.Context, lsp.CodeAction) (*lsp.CodeAction, error)

func ResolveCodeActionHandler

func ResolveCodeActionHandler(
	c *config.Config,
	service *CodeActionsService,
	server lsp.Server,
	authenticationService khulnasoft.AuthenticationService,
	learnService learn.Service,
) ResolveHandler

ResolveCodeActionHandler returns a jrpc2.Handler that can be used to handle the "codeAction/resolve" LSP method

type TextDocumentCodeActionHandler

type TextDocumentCodeActionHandler func(context.Context, lsp.CodeActionParams) ([]lsp.CodeAction, error)

func GetCodeActionHandler

func GetCodeActionHandler(c *config.Config, service *CodeActionsService) TextDocumentCodeActionHandler

GetCodeActionHandler returns a jrpc2.Handler that can be used to handle the "textDocument/codeAction" LSP method

Jump to

Keyboard shortcuts

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