inline_variable
Inline a local variable by replacing all usages with its initializer expression. Apply returned text edits after positioning cursor on variable declaration or usage.
Instructions
Inline a local variable by replacing all usages with its initializer expression.
Returns the text edits needed to inline the variable. The caller should apply these edits to perform the inlining.
USAGE: Position cursor on variable declaration or usage OUTPUT: Edits to delete declaration and replace usages with initializer
IMPORTANT: Uses ZERO-BASED coordinates. SAFETY: Will refuse if variable is modified after initialization.
Requires load_project to be called first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| column | Yes | Zero-based column number | |
| line | Yes | Zero-based line number of variable declaration or usage | |
| filePath | Yes | Path to source file |