Skip to content

Add .mill extension to Scala language highlighting #7028

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 2 commits 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.

  • 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)
@lildude lildude added the Stale label Mar 5, 2025
quat1024 added a commit to CrackedPolishedBlackstoneBricksMC/toybox that referenced this pull request Mar 15, 2025
@lihaoyi lihaoyi requested a review from lildude May 5, 2025 13:40
@lihaoyi
Copy link
Author

lihaoyi commented May 5, 2025

Hi! It's been a while since we adopted the new extension, and the The new extension is used in hundreds of repositories on GitHub.com requirements seems to be met now: https://github.com/search?type=code&q=NOT+is%3Afork+path%3Abuild.mill+%22import+mill%22 lists 450 repos using this syntax, and I expect the number to continue to grow over time as people upgrade to the latest version and use the new extension

@lihaoyi
Copy link
Author

lihaoyi commented May 6, 2025

I have also completed the checklist, added the search URL in the PR description, and added a sample file together with it's license

@tarmath

This comment was marked as off-topic.

@Quafadas

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants