DavidAnson / vscode-markdownlint

Markdown linting and style checking for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint
MIT License
897 stars 166 forks source link

Respect VSCode formatting toggles #252

Closed globalhuman closed 1 year ago

globalhuman commented 1 year ago

VSCode has built in toggles which enables/disables certain formatting commands such as

"editor.formatOnPaste",
"editor.formatOnSave",
"editor.formatOnType"

These are currently not respected by this extension. The current way to disable linting is via the command markdownlint.toggleLinting.

This causes inconsistency with other extensions which provide functionality around toggling formatting such as the popular extension tombonnike.vscode-status-bar-format-toggle.

Many other format providers respect the above vscode values and it would be great if this would too!

DavidAnson commented 1 year ago

The documentation already outlines how to use those settings as you suggest: https://github.com/DavidAnson/vscode-markdownlint#fix

Is there something else you are looking for?

globalhuman commented 1 year ago

Thanks for the response David.

My issue initially was that this extension was not respecting the state of the non-lang specific settings i.e. not having "[markdown]" but instead just the root "editor.formatOnSave": true.

After adding in the language specific setting as suggested and removing it again my issue has resolved itself and is not reproducible for the time being 🤷

I will close this ticket for now but if I end up reproducing it will capture some more details to share.

DavidAnson commented 1 year ago

Weird, but glad it's working!