rename_symbol
Rename a symbol across the entire workspace using LSP. Preview changes with dry_run, exclude files with glob patterns, and target positions reliably.
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 |
|---|---|---|---|
| line | No | ||
| column | No | ||
| dry_run | No | ||
| new_name | Yes | ||
| file_path | Yes | ||
| language_id | No | ||
| exclude_globs | No | ||
| position_pattern | No |