Documentation
¶
Index ¶
- func ApplyTextEdits(ctx context.Context, client *lsp.Client, filePath string, edits []TextEdit) (string, error)
- func ApplyWorkspaceEdit(edit protocol.WorkspaceEdit) error
- func ExtractTextFromLocation(loc protocol.Location) (string, error)
- func FindReferences(ctx context.Context, client *lsp.Client, symbolName string, ...) (string, error)
- func GetDiagnosticsForFile(ctx context.Context, client *lsp.Client, filePath string, includeContext bool, ...) (string, error)
- func GetFullDefinition(ctx context.Context, client *lsp.Client, startLocation protocol.Location) (string, protocol.Location, error)
- func ReadDefinition(ctx context.Context, client *lsp.Client, symbolName string, ...) (string, error)
- type TextEdit
- type TextEditType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyTextEdits ¶
func ApplyWorkspaceEdit ¶
func ApplyWorkspaceEdit(edit protocol.WorkspaceEdit) error
ApplyWorkspaceEdit applies the given WorkspaceEdit to the filesystem
func FindReferences ¶
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
Types ¶
type TextEdit ¶
type TextEdit struct { Type TextEditType `json:"type" jsonschema:"required,enum=replace|insert|delete,description=Type of edit operation (replace, insert, delete)"` 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. Leave blank to clear lines."` }
type TextEditType ¶
type TextEditType string
const ( Replace TextEditType = "replace" Insert TextEditType = "insert" Delete TextEditType = "delete" )
Click to show internal directories.
Click to hide internal directories.