Rename a symbol
nvim_rename_symbolRename a symbol across the entire workspace using LSP, then save all changed files. Provides safer refactoring than text search and replace.
Instructions
Rename a symbol across the whole workspace with the LSP, then save every changed file. Safer than a text search and replace.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"line": "<line>",
"column": "<column>",
"new_name": "<new_name>"
},
"name": "nvim_rename_symbol"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | Line number, 1-based | |
| path | Yes | File path | |
| column | Yes | Column number, 1-based | |
| wait_ms | No | LSP timeout | |
| new_name | Yes | New symbol name |