rename_symbol
Generate a WorkspaceEdit to rename a symbol across the entire workspace using LSP. Preview changes with dry_run and refine targeting with position patterns, then apply the edit with a separate call.
Instructions
Get a WorkspaceEdit for renaming a symbol across the entire workspace via LSP. Returns the edit object — NOT applied automatically. Use dry_run=true to preview what would change (returns workspace_edit + note). Use position_pattern with @@ marker for reliable position targeting instead of line/column. Inspect the returned WorkspaceEdit then call apply_edit to commit. Optional exclude_globs (array of glob patterns, e.g. ["vendor/", "/*_gen.go"]) skips matching files from the rename — useful for generated code, vendored files, and test fixtures.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| language_id | No | ||
| line | No | ||
| column | No | ||
| new_name | Yes | ||
| position_pattern | No | ||
| dry_run | No | ||
| exclude_globs | No |