-
Notifications
You must be signed in to change notification settings - Fork 738
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
Kotlin: Fix highlighting plugin names for build.gradle.kts files #1323
Kotlin: Fix highlighting plugin names for build.gradle.kts files #1323
Conversation
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.
Thanks for this PR, too :)
@lordcodes Did anything change with the force-pushed code? It didn't appear that it did but am not sure. |
Sorry, no just rebasing branches. I will comment when all these updates are
done!
…On Sun, 8 Sep 2019, 16:47 Michael Camilleri, ***@***.***> wrote:
@lordcodes <https://github.com/lordcodes> Did anything change with the
force-pushed code? It didn't appear that it did but am not sure.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1323?email_source=notifications&email_token=ACWLLEZRXSKFIVIOZJ6HOULQIUNANA5CNFSM4IUPYSIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6FS43Q#issuecomment-529215086>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACWLLE7O623XBZQEGWQ76ILQIUNANANCNFSM4IUPYSIA>
.
|
@lordcodes No problem—understood! |
Changes are rebased on top of changes for #1326 so this PR should wait until that PR is merged first, so I can update this after that merge. However, changes for this PR are complete and after #1326 are very simple. Just allowing - and _ within name/identifier regex. This is valid as matches with different naming conventions developers may use for properties/functions within their Kotlin code and also for Gradle Kotlin DSL files, where _ and - will be common. |
When using Gradle Kotlin DSL, the contents are Kotlin code. However, in this situation you may have an identifier that contains a dash, due to it referring to the name of a Gradle plugin.
@pyrmont This PR is rebased onto latest master and is ready to go again! |
@lordcodes And so ends this series of improvements to the Kotlin lexer. Thank you again! 🎉 |
@pyrmont Haha, thanks for your help getting them merged! Its been fun! Will make the code snippets look much better on my blog too 🎉 |
Yep, definitely. The best part of maintaining the project is collaborating with other people to improve the code. It's kind of crazy when you stop and think about all the infrastructure that allows that to happen—yay Internet! :) |
Couldn't agree more! 👍 |
When using Gradle Kotlin DSL, the contents are Kotlin code. However, in this situation you may have an identifier that contains a dash, due to it referring to the name of a Gradle plugin.
Without this change it doesn't match at all and if the plugin name is wrapped in back-ticks it marks those as errors.
E.g.
Fixes #927
Fixes #1325
@pyrmont