manager

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager 管理一组 LSP 客户端(迁移自 opencode internal/app/lsp.go)。

它负责:按配置启动客户端 → initialize → 等待 ready → 启动工作区 watcher, 并对外暴露 `map[string]*lsp.Client`(即原 opencode 的 lspClients),供 diagnostics / edit / view / write / patch 等工具使用。

func NewManager

func NewManager() *Manager

NewManager 创建 LSP 客户端管理器。

func (*Manager) Clients

func (m *Manager) Clients() map[string]*lsp.Client

Clients 返回当前已就绪 / 正在启动的客户端快照(map 为副本)。

func (*Manager) Close

func (m *Manager) Close()

Close 停止全部 watcher 并关闭客户端。

func (*Manager) Start

func (m *Manager) Start(ctx context.Context, servers map[string]lsp.Server)

Start 按配置在后台启动全部 LSP 服务(各自独立 goroutine,互不阻塞)。

Jump to

Keyboard shortcuts

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