Skip to content

Add .mdc to Markdown #7326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GriceTurrble
Copy link

@GriceTurrble GriceTurrble commented Apr 10, 2025

Add .mdc to Markdown configuration to allow syntax highlighting for Cursor rules files.

Description

See discussion in Cursor forum here: What is a .mdc file?.

The Cursor team is simply using this extension for Markdown files with frontmatter for their rules files, which are gaining traction in a number of projects using Cursor AI. At present there seems to be nothing else different about their implementation, except that the file extension .mdc allows their editor to pick up the file to use a custom editor experience.

Adding it to Linguist would simply help with syntax highlighting of these files.

Checklist:

  • I am adding a new extension to a language.

    • The new extension is used in hundreds of repositories on GitHub.com
    • I have included a real-world usage sample for all extensions added in this PR:
      • Sample source(s):
        • [URL to each sample source, if applicable]
      • Sample license(s):
    • I have included a change to the heuristics to distinguish my language from others using the same extension.
  • I am adding a new language.

    • The extension of the new language is used in hundreds of repositories on GitHub.com.
    • I have included a real-world usage sample for all extensions added in this PR:
      • Sample source(s):
        • [URL to each sample source, if applicable]
      • Sample license(s):
    • I have included a syntax highlighting grammar: [URL to grammar repo]
    • I have added a color
      • Hex value: #RRGGBB
      • Rationale:
    • I have updated the heuristics to distinguish my language from others using the same extension.
  • I am fixing a misclassified language

    • I have included a new sample for the misclassified language:
      • Sample source(s):
        • [URL to each sample source, if applicable]
      • Sample license(s):
    • I have included a change to the heuristics to distinguish my language from others using the same extension.
  • I am changing the source of a syntax highlighting grammar

    • Old: [URL to grammar repo]
    • New: [URL to grammar repo]
  • I am updating a grammar submodule

  • I am adding new or changing current functionality

    • I have added or updated the tests for the new or changed functionality.
  • I am changing the color associated with a language

    • I have obtained agreement from the wider language community on this color change.
      • [URL to public discussion]
      • [Optional: URL to official branding guidelines for the language]

@GriceTurrble GriceTurrble requested a review from a team as a code owner April 10, 2025 15:04
Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the instructions for adding an extension as detailed in the CONTRIBUTING.md file.

Please also fill in the correct section of the template in the PR body and fill it in completely.

@lildude lildude changed the title feat: mdc files as markdown for Cursor rules files Add .mdc to Markdown Apr 10, 2025
@lildude lildude added Stale and removed Stale labels Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants