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 Pkl #6718
Add support for Pkl #6718
Conversation
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com> Signed-off-by: Sam Gammon <sam@elide.ventures>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1353,3 +1356,6 @@ | |||
[submodule "vendor/grammars/zephir-sublime"] | |||
path = vendor/grammars/zephir-sublime | |||
url = https://github.com/phalcon/zephir-sublime | |||
[submodule "vendor/grammars/language-pkl"] | |||
path = vendor/grammars/language-pkl | |||
url = https://github.com/nishtahir/language-pkl.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops. There should only be one new addition and the file should be alphabetised (that's what the script/add-grammar
script does. This last entry shouldn't be here.
- extensions: ['.pkl'] | ||
rules: | ||
- language: Pkl | ||
pattern: 'new|class|function|import|module|(\w+\s*({|=))' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks waaaay too loose as it'll match those first few strings anywhere in the line, eg it'll match "this new language is pkl" or "I came first in my class" or "this functionality is awesome" or "imported cheese smells". You probably don't want this 😉.
Oh yes, and we're going to also need a test for the heuristic. |
Hi @sgammon. We're preparing a PR for linguist, it should come soon. The grammar you are using in this submission is our current vscode one, which is pretty bare bones, we have a updated version of it now. |
@stackoverflow Ah, good to know 😄. We can close this PR or point at the new grammar, entirely up to you guys. |
Closing for now, can re-open if needed |
Adds support for the new Pkl configuration language from Apple.
Description
Credit to:
Fixes and closes #6705
Fixes and closes apple/pkl#155
Changelog
Checklist:
I am adding a new extension to a language.
I am adding a new language.
apple/pkl-go-examples
#6b9543
I am fixing a misclassified language
I am changing the source of a syntax highlighting grammar
I am updating a grammar submodule
I am adding new or changing current functionality
I am changing the color associated with a language