Set up Markdownlint to recognize math expressions #1387
Replies: 3 comments 1 reply
-
Moving to |
Beta Was this translation helpful? Give feedback.
-
I don't think there's anything we can do about the lack of portability - maybe Mason can provide some sort of solution? As for the second issue, I went over the documentation and it doesn't seem that this is supported. I have no idea why they chose to set up the CLI like this instead of just merging command line options with a config file. It may be worth opening an issue upstream. |
Beta Was this translation helpful? Give feedback.
-
In null_ls.builtins.formatting.markdownlint.with {
command = 'markdownlint-cli2-config',
args = {
U.fn.expand('~/.config/fix.markdownlint-cli2.jsonc'),
'$FILENAME'
},
}, Here, Reference for future people: |
Beta Was this translation helpful? Give feedback.
-
I just went through the tedious process to set up
markdownlint
to recognize$$…$$
and$…$
in my markdown. See the commit in my.config
repo for details.Motivation
Previously, by default and my configuration,
markdownlint
onnull-ls
gives an error on anything like this saying that the emphasis should be*
However, this problem does not show up in the VSCode plugin. The reason is that they use a math plugin for
markdownlint
.Steps
Switch to
markdownlint-cli2
so we can add the plugin. For me, I installed it with Homebrew because Mason does not have it.Set the
markdownlint-cli2
argument to$FILENAME
so it works.Make a
.markdownlint-cli2.jsonc
like this:markdownlint-cli2
does not respect global config 😢, so we need to usemarkdownlint-cli2-config
and put make the config file its first argument.It does not run because
@iktakahiro/markdown-it-katex
does not exist,npm install -g
.macOS cannot find global NPM packages, so I need to set
$NODE_PATH
.Finally, then, it would work as expected. The config looks like this:
Pities
node
stuff again.formatting
option formarkdownlint-cli2
. And, I do not know a way to callmarkdownlint-cli2-fix
with the config file.Beta Was this translation helpful? Give feedback.
All reactions