Skip to content
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

Add .mill extension to Scala language highlighting #7028

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

Conversation

lihaoyi
Copy link

@lihaoyi lihaoyi commented Sep 3, 2024

The Mill Scala build tool recently moved its file format extension from .sc to .mill (com-lihaoyi/mill#3426) to better differentiate it from other Scala scripts (Ammonite, Scala-CLI, IntelliJ/VSCode worksheets). This updates Linguist to understand that .mill files should be highlighted as Scala

Description

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]

@lihaoyi lihaoyi requested a review from a team as a code owner September 3, 2024 15:15
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 details for adding an extension in the CONTRIBUTING.md file.

Please also use and fill in the PR template; it's there for a reason.

@lihaoyi
Copy link
Author

lihaoyi commented Sep 3, 2024

Got it! Will follow the instructions and report back when we have >200 results in the wild

lihaoyi added a commit to com-lihaoyi/mill that referenced this pull request Sep 4, 2024
Need to make sure everything works and dogfood it a bit before
0.12.0-RC1

This converts Mill over to the `build.mill` file extension. We also
break up `build.mill` into per-folder `package.mill` files:
`scalalib/package.mill`, `main/package.mill`, etc.

IntelliJ users would need go to `Settings` / `Editor` / `File Types` /
`Scala` and add `*.mill`. Github syntax highlighting doesn't work, which
is expected for now until
github-linguist/linguist#7028 lands (which will
need to wait for some usage in the wild according to Github's syntax
highlighting policy)
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