Skip to content

Add Fun language support - #8155

Open
Funlang wants to merge 3 commits into
github-linguist:mainfrom
Funlang:add-fun-language
Open

Add Fun language support#8155
Funlang wants to merge 3 commits into
github-linguist:mainfrom
Funlang:add-fun-language

Conversation

@Funlang

@Funlang Funlang commented Aug 31, 2026

Copy link
Copy Markdown

Add the Fun scripting language (https://funlang.org) to Linguist.

The .fun extension was previously exclusive to Standard ML, so a heuristic is added to disambiguate Fun from Standard ML based on Fun's distinctive syntax (line comments starting with '#', end <keyword> block terminators, var <name> = declarations, and the ?. print operator). Standard ML remains the default for .fun files that do not match those markers.

Samples are taken verbatim from the MIT-licensed Funlang/fun repository (copyright Zhang Weidong), including its demo programs and standard library modules.

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):
        • [https://www.funlang.org/demo/]
      • Sample license(s): MIT
    • I have included a syntax highlighting grammar: [https://github.com/Funlang/funide/blob/main/syntaxes/fun.tmLanguage.yaml]
    • I have added a color
      • Hex value: #f3d325
      • 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]

Add the Fun scripting language (https://funlang.org) to Linguist.

The `.fun` extension was previously exclusive to Standard ML, so a
heuristic is added to disambiguate Fun from Standard ML based on Fun's
distinctive syntax (line comments starting with '#', `end <keyword>`
block terminators, `var <name> =` declarations, and the `?.` print
operator). Standard ML remains the default for `.fun` files that do not
match those markers.

Samples are taken verbatim from the MIT-licensed Funlang/fun repository
(copyright Zhang Weidong), including its demo programs and standard
library modules.
@Funlang
Funlang requested a review from a team as a code owner August 31, 2026 04:43
Vendor the Fun TextMate grammar (hosted at Funlang/funide) as a git
submodule and wire it into Linguist so .fun files get syntax
highlighting:

- vendor/grammars/fun submodule -> Funlang/funide
- grammars.yml: vendor/grammars/fun: [source.fun]
- languages.yml: Fun tm_scope none -> source.fun
- vendor/licenses/git_submodule/fun.dep.yml (MIT)
@lildude lildude added the Invalid CONTRIBUTING.md file has not been followed or PR template not used. label Aug 31, 2026
@Funlang

Funlang commented Sep 1, 2026

Copy link
Copy Markdown
Author

Hello, thank you for reviewing my PR. I see that it has been marked as invalid, and I’m happy to make any necessary changes.

Regarding the checklist, I’ve already completed the following items:

  • ✅ Added the language grammar for syntax highlighting.
  • ✅ Assigned a colour (#f3d325).
  • ✅ Added heuristics to distinguish .fun files between Fun and Standard ML.

However, I’d like to clarify a couple of points where I may have fallen short:

  1. “The new extension is used in hundreds of repositories on GitHub.com” – I only provided one official example link. Should I provide a GitHub search query that shows a significant number of repositories using .fun files? If so, I can add that link.

  2. “Sample license(s):” – I left this blank in my checklist. The sample code I used is from the official Fun language repository, which is licensed under MIT. Should I explicitly mention that in the checklist?

  3. Checklist formatting – I see that my checklist might look messy (e.g., repeated “Sample source(s)” lines). I can clean it up if that would help.

Could you please point me to the specific requirements I’m still missing? I’ll update the PR promptly. Thanks again for your time!

@lildude

lildude commented Sep 1, 2026

Copy link
Copy Markdown
Member

As stated in the CONTRIBUTING.md file, PRs will not be reviewed until the PR template is filled in correctly. That means providing the information and links in the right place in the template.

  1. I only provided one official example link. Should I provide a GitHub search query that shows a significant number of repositories using .fun files?

Yes. That part of the template is there for a reason 😉 That's how you prove your extension and language meets our usage requirements.

2. “Sample license(s):” – I left this blank in my checklist. The sample code I used is from the official Fun language repository, which is licensed under MIT. Should I explicitly mention that in the checklist?

Yes, that's what we're asking you to do.

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

Labels

Invalid CONTRIBUTING.md file has not been followed or PR template not used.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants