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 support for the Pkl configuration language #6705

Open
pixelcmtd opened this issue Feb 11, 2024 · 3 comments
Open

Add support for the Pkl configuration language #6705

pixelcmtd opened this issue Feb 11, 2024 · 3 comments
Labels
Add Language Good First Issue This is a great opportunity to start contributing to Linguist

Comments

@pixelcmtd
Copy link

pixelcmtd commented Feb 11, 2024

Language name

To quote Pkl's homepage:

Pkl — pronounced Pickle — is a configuration-as-code language with rich validation and tooling. It can be used as a command line tool, software library, or build plugin. Pkl scales from small to large, simple to complex, ad-hoc to recurring configuration tasks.

We created Pkl because we believe that configuration is best expressed in a special-purpose configuration language; a blend between a static configuration format, and a general-purpose programming language.

Not to be confused with Python's “Pickle” serialisation format, stored on-disk using .pkl as a file extension.

URL of example repository

https://github.com/apple/pkl-k8s-examples

URL of syntax highlighting grammar

https://github.com/apple/tree-sitter-pkl

Editor extensions

Most popular file extensions

.pkl

Detected language

none

@pixelcmtd pixelcmtd added Add Language Good First Issue This is a great opportunity to start contributing to Linguist labels Feb 11, 2024
@Alhadis
Copy link
Collaborator

Alhadis commented Feb 11, 2024

The format you're referring to is already supported by Linguist as Pickle, assuming it's the same format documented by FileInfo.com. However, it lacks syntax highlighting (which may give the impression of the format not being supported on GitHub), so if you know of a TextMate-compatible grammar (i.e., not a Tree-Sitter grammar), we'd welcome a pull-request to add it, provided it's released under a permissive license. See CONTRIBUTING.md for more info on that.

EDIT: Never mind, I spoke too soon. I see that this actually refers to a different format entirely, one very similar to many other configuration-first data formats. Shouldn't be too hard to implement as a TextMate grammar, if one doesn't already exist. pkl-vscode doesn't qualify because the .tmLanguage.json file (the TextMate grammar proper) is generated at build-time and only distributed as part of a release asset (the VSIX bundle installed by VS Code; e.g., pkg-vscode-0.15.0.vsix. We could use Apple's Tree-Sitter grammar, but that's handled internally by GitHub staff, and not by Linguist…

@Alhadis Alhadis changed the title New Language: Pkl Add support for the Pkl configuration language Feb 11, 2024
@nishtahir
Copy link
Contributor

@Alhadis I took a stab at putting together a repo here https://github.com/nishtahir/language-pkl. Seems to work well in NovaLightshow . If you guys are ok with this, I can open a PR with it.

@sgammon sgammon mentioned this issue Feb 25, 2024
19 tasks
@bioball
Copy link

bioball commented Apr 12, 2024

New PR: #6730

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add Language Good First Issue This is a great opportunity to start contributing to Linguist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants