tools

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyTextEdits

func ApplyTextEdits(ctx context.Context, client *lsp.Client, filePath string, edits []TextEdit) (string, error)

func ExecuteCodeLens added in v0.0.2

func ExecuteCodeLens(ctx context.Context, client *lsp.Client, filePath string, index int) (string, error)

ExecuteCodeLens executes a specific code lens command from a file.

func ExtractTextFromLocation

func ExtractTextFromLocation(loc protocol.Location) (string, error)

func FindReferences

func FindReferences(ctx context.Context, client *lsp.Client, symbolName string, showLineNumbers bool) (string, error)

func GetCodeLens added in v0.0.2

func GetCodeLens(ctx context.Context, client *lsp.Client, filePath string) (string, error)

GetCodeLens retrieves code lens hints for a given file location

func GetDiagnosticsForFile

func GetDiagnosticsForFile(ctx context.Context, client *lsp.Client, filePath string, includeContext bool, showLineNumbers bool) (string, error)

GetDiagnostics retrieves diagnostics for a specific file from the language server

func GetFullDefinition

func GetFullDefinition(ctx context.Context, client *lsp.Client, startLocation protocol.Location) (string, protocol.Location, error)

Gets the full code block surrounding the start of the input location

func ReadDefinition

func ReadDefinition(ctx context.Context, client *lsp.Client, symbolName string, showLineNumbers bool) (string, error)

Types

type TextEdit

type TextEdit struct {
	StartLine int    `json:"startLine" jsonschema:"required,description=Start line to replace, inclusive"`
	EndLine   int    `json:"endLine" jsonschema:"required,description=End line to replace, inclusive"`
	NewText   string `json:"newText" jsonschema:"description=Replacement text. Replace with the new text. Leave blank to remove lines."`
}

Jump to

Keyboard shortcuts

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