Help us shape the future of Go! Take the 2026 Go Developer Survey

watcher

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WorkspaceWatcher

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

WorkspaceWatcher manages LSP file watching

func NewWorkspaceWatcher

func NewWorkspaceWatcher(client *lsp.Client) *WorkspaceWatcher

NewWorkspaceWatcher creates a new workspace watcher

func (*WorkspaceWatcher) AddRegistrations

func (w *WorkspaceWatcher) AddRegistrations(ctx context.Context, id string, watchers []protocol.FileSystemWatcher)

AddRegistrations adds file watchers to track

func (*WorkspaceWatcher) WatchWorkspace

func (w *WorkspaceWatcher) WatchWorkspace(ctx context.Context, workspacePath string, hub *fswatch.Hub)

WatchWorkspace runs the per-client watching logic for a workspace: it receives filesystem events from the shared hub (it owns no fsnotify watcher itself), preloads files, and turns matching events into debounced workspace/didChangeWatchedFiles notifications for its LSP client. It blocks until ctx is cancelled or the hub is closed, and unsubscribes on return.

Jump to

Keyboard shortcuts

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