format_range
Get formatting edits for a selected code range via LSP. Returns TextEdit[] for the specified lines or characters without applying them, ideal for formatting a function or block instead of the whole file.
Instructions
Get formatting edits for a specific range within a document via LSP (textDocument/rangeFormatting). Returns TextEdit[] for the selected lines/characters only. Use this when you want to format a function, block, or selection rather than the entire file. The edits are NOT applied automatically.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_line | Yes | ||
| tab_size | No | ||
| file_path | Yes | ||
| end_column | Yes | ||
| start_line | Yes | ||
| language_id | No | ||
| start_column | Yes | ||
| insert_spaces | No |