denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
98.07k stars 5.4k forks source link

Markdown --indent-width is ignored #26863

Open janos-r opened 1 week ago

janos-r commented 1 week ago

Version: deno 2.0.6 The default indentation is 2, but it should be possible to change it with --indent-width.

The default 2 correctly complains about a width of 4 image

But when even when I set it to 4, it still complains image

If I set it to any other number, it still thinks that the correct width is the default 2 image

MohammadSu1 commented 1 week ago

@bartlomieju I was investigating this problem and noticed that the indent_width parameter seems to be fixed at 2. This conclusion is based on the attached code, which includes the dprint.json file from the dprint-plugin-markdown repository. Markdown issue

bartlomieju commented 1 week ago

@MohammadSu1 this file seems to be unrelated to the problem - it's the configuration for the project itself. The problem seems to be that https://github.com/dprint/dprint-plugin-markdown/blob/main/src/configuration/builder.rs#L25 doesn't support configuring indentation width.