5151 add mdformat support (#5152)

* fix(tests): fix ale_c_build_dir_names being unset in tests (#5109)

- Use ale#Set() to set the ale_c_build_dir_names variable.
- Ensure SetUpLinterTest() is called before any Save commands in tests.
- Add c.vim to runtime before non-linter tests are executed.
- Remove workarounds in c.vim.

* feat: Load Prettier from cjs also

* Add support for mdformat

---------

Co-authored-by: w0rp <devw0rp@gmail.com>
This commit is contained in:
Horacio Sanson
2026-07-25 22:54:22 +09:00
committed by GitHub
co-authored by w0rp
parent 069baf559e
commit 40cbe2121b
7 changed files with 168 additions and 0 deletions
+71
View File
@@ -82,6 +82,77 @@ g:ale_markdown_marksman_executable
Override the invoked `marksman` binary.
===============================================================================
mdformat *ale-markdown-mdformat*
*ale-options.markdown_mdformat_executable*
*g:ale_markdown_mdformat_executable*
*b:ale_markdown_mdformat_executable*
markdown_mdformat_executable
g:ale_markdown_mdformat_executable
Type: |String|
Default: `'mdformat'`
See |ale-integrations-local-executables|
Set this to `'pipenv'` to invoke `pipenv run mdformat`.
Set this to `'poetry'` to invoke `poetry run mdformat`.
Set this to `'uv'` to invoke `uv run mdformat`.
*ale-options.markdown_mdformat_options*
*g:ale_markdown_mdformat_options*
*b:ale_markdown_mdformat_options*
markdown_mdformat_options
g:ale_markdown_mdformat_options
Type: |String|
Default: `''`
This variable can be changed to add command-line arguments to mdformat.
*ale-options.markdown_mdformat_use_global*
*g:ale_markdown_mdformat_use_global*
*b:ale_markdown_mdformat_use_global*
markdown_mdformat_use_global
g:ale_markdown_mdformat_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.markdown_mdformat_auto_pipenv*
*g:ale_markdown_mdformat_auto_pipenv*
*b:ale_markdown_mdformat_auto_pipenv*
markdown_mdformat_auto_pipenv
g:ale_markdown_mdformat_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to
`pipenv` if true. This is overridden by a manually-set executable.
*ale-options.markdown_mdformat_auto_poetry*
*g:ale_markdown_mdformat_auto_poetry*
*b:ale_markdown_mdformat_auto_poetry*
markdown_mdformat_auto_poetry
g:ale_markdown_mdformat_auto_poetry
Type: |Number|
Default: `0`
Detect whether the file is inside a Poetry project, and set the executable
to `poetry` if true. This is overridden by a manually-set executable.
*ale-options.markdown_mdformat_auto_uv*
*g:ale_markdown_mdformat_auto_uv*
*b:ale_markdown_mdformat_auto_uv*
markdown_mdformat_auto_uv
g:ale_markdown_mdformat_auto_uv
Type: |Number|
Default: `0`
Detect whether the file is inside a uv project, and set the executable to
`uv` if true. This is overridden by a manually-set executable.
===============================================================================
mdl *ale-markdown-mdl*
@@ -436,6 +436,7 @@ Notes:
* `languagetool`!!
* `markdownlint`!!
* `marksman`
* `mdformat`
* `mdl`
* `pandoc`
* `prettier`
+1
View File
@@ -3779,6 +3779,7 @@ documented in additional help files.
harper................................|ale-markdown-harper|
markdownlint..........................|ale-markdown-markdownlint|
marksman..............................|ale-markdown-marksman|
mdformat..............................|ale-markdown-mdformat|
mdl...................................|ale-markdown-mdl|
pandoc................................|ale-markdown-pandoc|
prettier..............................|ale-markdown-prettier|