dprint/dprint-plugin-markdown

add support for spaces

ivanhofer opened this issue · 1 comments

I have configured dprint to use tabs to format my source code, but for markdown files I want to use spaces, because tabs have an ugly indent level on npmjs.com. I would expect that overriding the config for markdown files would work:

.dprint.json

{
	"$schema": "https://plugins.dprint.dev/dprint/dprint-plugin-json/latest/schema.json",
	"useTabs": true,
+	"markdown": {
+		"useTabs": false
+	},
	"plugins": [
		"https://plugins.dprint.dev/markdown-0.14.1.wasm"
	]
}

But when running dprint format I get the following error:

> dprint fmt

[dprint-plugin-markdown]: Unknown property in configuration: useTabs (useTabs)
[dprint-plugin-markdown]: Error initializing from configuration file. Had 1 diagnostic(s).
Had 1 error(s) formatting.
 ELIFECYCLE  Command failed with exit code 1.

I can set useTabs to false globally, but not just for markdown files.

My problem is the exact opposite. I want tab indentation in markdown, but useTabs doesn't affect the markdown plugin at all. See this playground snippet.
Could there be / is there currently at least an option to disable indent fixing while tabs are not supported?

Maybe this can be addressed together with Add support for identation size · Issue #78.
Here's some more discussion on why some people want tabs.