coc-markdownlint
coc-markdownlint copied to clipboard
Request: Add line length autofix
It would be nice if autofix split lines to the corrrect length.
Just for anyone looking into this thinking maybe they got something wrong with their configurations: this extension does not currently support automatically splitting lines to fix line length limits.
I’d be real happy to try and look into this, since I personally spent a few hours trying to get this result. @fannheyward any place you’d suggest looking into first? That’d be a big help
@ManuelGarciaF my current workaround for this was to setup Prettier to work on Markdown files and then configure Prettier to run under ESLint by extending plugin:md/prettier
in my .eslintrc.json
. I haven’t checked if adding specific Markdown configs in my .prettierrc.json
was completely necessary, but this is currently doing the line splitting when I save:
{
"proseWrap": "always",
"overrides": [
{
"files": ["*.md"],
"parser": "markdown-eslint-parser",
"rules": {
"prettier/prettier": [
"error",
{
"parser": "markdown"
}
]
}
}
]
}
proseWrap
does the actual trick, hope it works for you! 👍
I used an advice from here. It works in vim without any extra dependencies.