hover

package
v0.0.0-...-1fb2453 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context any

type DefaultHoverService

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

func (*DefaultHoverService) Channel

func (s *DefaultHoverService) Channel() chan DocumentHovers

func (*DefaultHoverService) ClearAllHovers

func (s *DefaultHoverService) ClearAllHovers()

func (*DefaultHoverService) DeleteHover

func (s *DefaultHoverService) DeleteHover(path string)

func (*DefaultHoverService) GetHover

func (s *DefaultHoverService) GetHover(path string, pos snyk.Position) Result

type DocumentHovers

type DocumentHovers struct {
	Path  string
	Hover []Hover[Context]
}

type FakeHoverService

type FakeHoverService struct {
	DeletedHovers map[string]bool
	// contains filtered or unexported fields
}

func NewFakeHoverService

func NewFakeHoverService() *FakeHoverService

func (*FakeHoverService) Calls

func (t *FakeHoverService) Calls() int

func (*FakeHoverService) Channel

func (t *FakeHoverService) Channel() chan DocumentHovers

func (*FakeHoverService) ClearAllHovers

func (t *FakeHoverService) ClearAllHovers()

func (*FakeHoverService) DeleteHover

func (t *FakeHoverService) DeleteHover(path string)

func (*FakeHoverService) GetHover

func (t *FakeHoverService) GetHover(_ string, _ snyk.Position) Result

type Hover

type Hover[T Context] struct {
	Id      string
	Range   snyk.Range
	Message string
	Context T // this normally contains snyk.Issue
}

type MarkupContent

type MarkupContent struct {
	Kind  string `json:"kind"`
	Value string `json:"value"`
}

type Params

type Params struct {
	TextDocument sglsp.TextDocumentIdentifier `json:"textDocument"`
	Position     sglsp.Position               `json:"position"`
}

type Result

type Result struct {
	Contents MarkupContent `json:"contents"`
}

type Service

type Service interface {
	DeleteHover(path string)
	Channel() chan DocumentHovers
	ClearAllHovers()
	GetHover(path string, pos snyk.Position) Result
}

func NewDefaultService

func NewDefaultService(c *config.Config) Service

Jump to

Keyboard shortcuts

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