rename_symbol
Rename code symbols across your entire workspace using Language Server Protocol. Preview changes before applying, exclude specific files, and ensure accurate refactoring with position-based targeting.
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 |