indexer

package
v0.1.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateEnv

func UpdateEnv(env []string, wsRoot string) []string

UpdateEnv updates the environment variables with the workspace root.

Types

type Controller

type Controller interface {
	StartupInfo(ctx context.Context) (ulspplugin.PluginInfo, error)
}

Controller defines the methods that this controller provides.

func New

func New(p Params) Controller

New controller for indexer

type Indexer

type Indexer interface {
	// SyncIndex syncs the index for the given document.
	SyncIndex(ctx context.Context, executor executor.Executor, ideGateway ideclient.Gateway, logger *zap.SugaredLogger, doc protocol.TextDocumentItem) error

	// IsRelevantDocument returns true if the document is relevant for this indexer.
	// This is where you specify which language to support for indexing
	IsRelevantDocument(document protocol.TextDocumentItem) bool

	// GetUniqueIndexKey returns a unique key for the document.
	// This will be used to check if any indexing is in progress
	GetUniqueIndexKey(document protocol.TextDocumentItem) (string, error)
}

Indexer defines the interface for an indexer.

func NewJavaIndexer

func NewJavaIndexer(fs fs.UlspFS, s *entity.Session, outputWriter io.Writer) Indexer

NewJavaIndexer return a new java indexer

type Params

type Params struct {
	fx.In

	Sessions       session.Repository
	Logger         *zap.SugaredLogger
	Config         config.Provider
	Documents      docsync.Controller
	Guidance       userguidance.Controller
	Stats          tally.Scope
	Executor       executor.Executor
	IdeGateway     ideclient.Gateway
	FS             fs.UlspFS
	Lifecycle      fx.Lifecycle
	ServerInfoFile serverinfofile.ServerInfoFile
}

Params defines the dependencies that will be available ot this controller.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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