lsp_range_format_preview
Preview formatting changes for a selected range in a file. Returns a unified diff to review modifications before applying them.
Instructions
Preview formatting changes for a range within a file. Returns a unified diff without writing any files.
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": {
"filePath": "<filePath>",
"range": "<range>"
},
"name": "lsp_range_format_preview"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | Range to format. | |
| tabSize | No | Tab size. | |
| filePath | Yes | Absolute or workspace-relative path to the file. | |
| includeDiff | No | Whether to include a unified diff. | |
| insertSpaces | No | Use spaces instead of tabs. |