Skip to content

Add Skript and Skip languages with .sk extension disambiguation - #8054

Open
RohanDaCoder wants to merge 4 commits into
github-linguist:mainfrom
RohanDaCoder:add-skript-language
Open

RohanDaCoder wants to merge 4 commits into
github-linguist:mainfrom
RohanDaCoder:add-skript-language

Conversation

@RohanDaCoder

@RohanDaCoder RohanDaCoder commented Jul 4, 2026 •

Copy link
Copy Markdown

Description

Adds Skript and Skip to languages.yml — both use the .sk extension — plus a disambiguation heuristic in heuristics.yml.

Skript is a scripting language for Minecraft servers (a Paper/Bukkit plugin) that lets server owners modify their servers without writing Java. Skip is a general-purpose language with reactive caching; its compiler and standard library are written in .sk files.

.sk is not currently claimed by any language in languages.yml, so .sk files fall through unclassified today. This addresses the requirements in #6559 (a second .sk language plus a heuristic), supersedes #7659, and closes #6857. Credit to @Camden-png for the original grammar and colour work.

Heuristic

- extensions: ['.sk']
  rules:
  - language: Skript
    pattern: '\{[_a-zA-Z]\w*(?:::[\w*]+)*\}'
  - language: Skip
    pattern: '^(?:module|fun|native|val|var|let)\s'

Skript is matched first on its curly-brace variable syntax ({var}, {list::key}), then Skip on line-leading declaration keywords. Both rules are specific, so a .sk file that matches neither falls through to the classifier rather than being forced into one language.

I checked every sample: each matches its own rule and does not match the other language's rule. script/check-regex-compatibility passes locally with Ruby, Go, and Rust, and the full test/test_heuristics.rb passes on an LF checkout (179 runs, 3079 assertions, 0 failures). GitHub Actions is currently showing action_required for this fork, so CI needs approval before it can run.

#6559 suggested Skip or Skew; this adds Skip. Skew can follow separately.

Checklist:

Adds support for the Skript language (Minecraft server scripting) and
Skip language (general-purpose reactive programming) to Linguist.

- Skript: Minecraft server scripting language with English-like syntax
  Grammar: SkriptLang/skript-grammar (MIT license)
  Samples: chest menus, text formatting, variables

- Skip: A general-purpose programming language tracking side effects
  Samples: skipComment.sk from the Skip compiler source

- Heuristic: Skript detected by curly-brace variable syntax ({var}, {list::key});
  Skip detected by module/fun/val declarations

Closes github-linguist#6857
@RohanDaCoder
RohanDaCoder requested a review from a team as a code owner July 4, 2026 05:47
@RohanDaCoder RohanDaCoder mentioned this pull request Jul 4, 2026
5 tasks done
@Camden-png

Copy link
Copy Markdown

Wow! Thank you, Rohan!

@lildude lildude added the Invalid CONTRIBUTING.md file has not been followed or PR template not used. label Jul 21, 2026
@lildude

lildude commented Aug 10, 2026

Copy link
Copy Markdown
Member

This PR will not be reviewed until you have correctly filled in our PR template. It's there for a reason and needs to be completed accordingly.

@RohanDaCoder
RohanDaCoder marked this pull request as draft October 23, 2026 03:49
- Replace the bundled Skript example scripts with MIT-licensed real-world scripts
- Add Skip prelude samples so both .sk languages have at least two samples
- Add test_sk_by_heuristics covering both languages
- Move the .sk heuristic block into alphabetical order
@RohanDaCoder
RohanDaCoder marked this pull request as ready for review October 23, 2026 04:19
@RohanDaCoder

Copy link
Copy Markdown
Author

@lildude I've updated this PR to fully comply with the CONTRIBUTING.md template and addressed the requirements raised in #6559.

What changed since the initial review:

  • Samples: Replaced the bundled Skript examples (which were essentially tutorials) with custom, MIT-licensed Skript scripts to avoid copyright ambiguity. Added real-world MIT-licensed Skip samples (from the official compiler source) so both languages meet the ≥2 sample requirement for shared extensions.
  • Heuristics: Added test_sk_by_heuristics and verified script/check-regex-compatibility passes cleanly.
  • Template: Filled out the checklist with exact search metrics, proper sample licensing, and language IDs generated via script/update-ids.

The Invalid label is still attached from my initial template mistake. Could you remove it so this can enter the normal review queue?

(Note: CI is currently action_required pending workflow approval for new contributors).

Thanks for the guidance and for your time reviewing!


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.

Add Skript

3 participants