mattn / mattn/efm-langserver

More markdownlint rules triggered from CLI than from efm

Open
#280 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
1.6k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

Invoking markdownlint from the CLI triggers more rules than invoking it via efm-langserver in Neovim.

Example Markdown:

# This line triggers MD043

This line should trigger MD013. This line should trigger MD013. This line should trigger MD013.

Both rules triggered on CLI:

$ markdownlint -c "$HOME/.markdownlint.yaml" TEST.md
TEST.md:1 MD043/required-headings Required heading structure [Expected: [None]; Actual: # This line triggers MD043]
TEST.md:3:81 MD013/line-length Line length [Expected: 80; Actual: 95]

efm-langserver in Neovim only shows MD043. I confirmed that both are using $HOME/.markdownlint.yaml. That is, if I disable all rules, efm-langserver stops showing MD043.

markdownlint: &markdownlint
  lint-command: 'markdownlint -s -c "$HOME/.markdownlint.yaml"'
  lint-stdin: true
  lint-formats:
    - '%f:%l %m'
    - '%f:%l:%c %m'
    - '%f: %l: %m'

I have never had this issue with any other command.

NVIM v0.10.0
efm-langserver 0.0.53
markdownlint 0.41.0

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the discrepancy using the shown markdownlint command and the efm-langserver configuration in Neovim, with the provided Markdown and markdownlint configuration. Compare how CLI output from stdin is handled and how diagnostics are parsed; done means MD043 and MD013 are both surfaced through efm as they are from the CLI.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, neovim
Domain
developer-experience, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.