import { formatWithCursor } from "https://deno.land/x/deno@v0.22.0/std/prettier/vendor/index.d.ts";
formatWithCursor
both formats the code, and translates a cursor position from unformatted code to formatted code.
This is useful for editor integrations, to prevent the cursor from moving when code is formatted.
The cursorOffset
option should be provided, to specify where the cursor is. This option cannot be used with rangeStart
and rangeEnd
.
Parameters
options: CursorOptions