microsoft / microsoft/vscode-markdown-languageservice

Allow validation of extensionless links to non-markdown syntax files

Open
#189 1 comment 0 reactions 1 assignee View on GitHub

@mjbvz is already working on this.

Since Dec 13, 2024.

feature-request
Dominant language
TypeScript
Stars
438
Forks
25
Avg merge
3d 21h
Merged PRs (30d)
1

Description

When working with "markdown.preferredMdPathExtensionStyle": "removeExtension" set, and a mix of MDX and MD files, it is not possible to validate and autocomplete links to MDX files from MD files using this language service.

The root cause, at least for validation, seems to be https://github.com/microsoft/vscode-markdown-languageservice/blob/7156aba6bdffef89b9210def0e0dda785569d1ab/src/workspace.ts#L227

This function requires all extensionless links in MD files to be handled by the language service. However, MDX files can't be handled by this service.

Perhaps a new setting ("markdown.knownMdExtensions": ["md", "mdx"]) could be added to allow link validation to find the file?

Contributor guide

Open the contributing guide

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.