diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/options_doc.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/options_doc.lua b/tests/options_doc.lua index 4360b92..6b215c2 100644 --- a/tests/options_doc.lua +++ b/tests/options_doc.lua @@ -30,6 +30,10 @@ require("conform").setup({ -- OPTIONAL - all fields below this are optional -- A list of strings, or a function that returns a list of strings args = { "--stdin-from-filename", "$FILENAME" }, + -- If the formatter supports range formatting, create the range arguments here + range_args = function(ctx) + return { "--line-start", ctx.range.start[1], "--line-end", ctx.range["end"][1] } + end, -- Send file contents to stdin, read new contents from stdout (default true) -- When false, will create a temp file (will appear in "$FILENAME" args). The temp -- file is assumed to be modified in-place by the format command. |