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

lsp

package
v1.11.13 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const Description = `` /* 1086-byte string literal not displayed */
View Source
const SearchHint = "" /* 130-byte string literal not displayed */

SearchHint is the search hint for the tool

View Source
const ToolName = "lsp"

ToolName is the name of the tool

Variables

This section is empty.

Functions

func CheckPermissions

func CheckPermissions(ctx context.Context, input map[string]any, toolCtx tool.ToolUseContext) types.PermissionResult

CheckPermissions checks if the LSP operation is allowed

func ParsePosition

func ParsePosition(pos string) (line, column int, err error)

ParsePosition parses a position string (line:column format)

Types

type Tool

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

Tool implements the LSP tool for code intelligence

func NewLspTool

func NewLspTool(workingDir string) *Tool

NewLspTool creates a new LSP tool

func (*Tool) BackfillInput

func (t *Tool) BackfillInput(ctx context.Context, input map[string]any) map[string]any

BackfillInput backfills input

func (*Tool) Call

func (t *Tool) Call(ctx context.Context, input tool.CallInput, permissionCheck types.CanUseToolFn) (tool.CallResult, error)

Call executes the tool

func (*Tool) CheckPermissions

func (t *Tool) CheckPermissions(ctx context.Context, input map[string]any, toolCtx tool.ToolUseContext) types.PermissionResult

CheckPermissions checks permissions

func (*Tool) Definition

func (t *Tool) Definition() tool.Definition

Definition returns the tool definition

func (*Tool) Description

func (t *Tool) Description(ctx context.Context) (string, error)

Description returns a human-readable description

func (*Tool) FormatResult

func (t *Tool) FormatResult(data any) string

FormatResult formats the result

func (*Tool) IsConcurrencySafe

func (t *Tool) IsConcurrencySafe(input map[string]any) bool

IsConcurrencySafe returns whether the tool is concurrency safe

func (*Tool) IsEnabled

func (t *Tool) IsEnabled() bool

IsEnabled returns whether the tool is enabled

func (*Tool) IsReadOnly

func (t *Tool) IsReadOnly(input map[string]any) bool

IsReadOnly returns whether the tool is read-only

func (*Tool) ValidateInput

func (t *Tool) ValidateInput(ctx context.Context, input map[string]any) (map[string]any, error)

ValidateInput validates the input

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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