<p>I forked the project on SourceForge, but seems like a lot of work, don't know if I will get around to doing it (as I have other projects I'm working on).</p>
<p>I found this:<br>
<a href="https://www.scintilla.org/Lexer.txt" rel="nofollow">https://www.scintilla.org/Lexer.txt</a></p>
<p>Basically, you would need to copy this file as LexKotlin.cxx:<br>
<a href="https://github.com/geany/geany/blob/master/scintilla/lexers/LexCPP.cxx">https://github.com/geany/geany/blob/master/scintilla/lexers/LexCPP.cxx</a><br>
<a href="https://sourceforge.net/p/scintilla/code/ci/default/tree/lexers/LexCPP.cxx" rel="nofollow">https://sourceforge.net/p/scintilla/code/ci/default/tree/lexers/LexCPP.cxx</a></p>
<p>Then add the new keywords and syntax that Kotlin has, such as <code>object</code> (lower-case), <code>data class</code>, <code>sealed class</code>, <code>fun</code>, <code>then</code>, etc. I think you'd probably also want to remove parsing of the ternary operator <code>a ? b : c</code> and add parsing for the elvis operator <code>a ?: b</code>.</p>
<p>You can also look at this project that is adding the Rust language:<br>
<a href="https://sourceforge.net/u/dobkeratops/scintilla/ci/default/tree/" rel="nofollow">https://sourceforge.net/u/dobkeratops/scintilla/ci/default/tree/</a></p>
<p>Here are other open source projects that have added Kotlin support for help as well:<br>
<a href="https://github.com/vkostyukov/kotlin-sublime-package">https://github.com/vkostyukov/kotlin-sublime-package</a><br>
<a href="https://github.com/nishtahir/language-kotlin">https://github.com/nishtahir/language-kotlin</a></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/1581#issuecomment-405182480">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ3J2-nrqurEAmRvGRKXxb-_2RqZTks5uHFL0gaJpZM4O8lkX">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABDrJ-fMxOzTxBA1jWhv3JwvO5sE8jTEks5uHFL0gaJpZM4O8lkX.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@esotericpig in #1581: I forked the project on SourceForge, but seems like a lot of work, don't know if I will get around to doing it (as I have other projects I'm working on).\r\n\r\nI found this:\r\nhttps://www.scintilla.org/Lexer.txt\r\n\r\nBasically, you would need to copy this file as LexKotlin.cxx:\r\nhttps://github.com/geany/geany/blob/master/scintilla/lexers/LexCPP.cxx\r\nhttps://sourceforge.net/p/scintilla/code/ci/default/tree/lexers/LexCPP.cxx\r\n\r\nThen add the new keywords and syntax that Kotlin has, such as `object` (lower-case), `data class`, `sealed class`, `fun`, `then`, etc. I think you'd probably also want to remove parsing of the ternary operator `a ? b : c` and add parsing for the elvis operator `a ?: b`.\r\n\r\nYou can also look at this project that is adding the Rust language:\r\nhttps://sourceforge.net/u/dobkeratops/scintilla/ci/default/tree/\r\n\r\nHere are other open source projects that have added Kotlin support for help as well:\r\nhttps://github.com/vkostyukov/kotlin-sublime-package\r\nhttps://github.com/nishtahir/language-kotlin"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1581#issuecomment-405182480"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/1581#issuecomment-405182480",
"url": "https://github.com/geany/geany/issues/1581#issuecomment-405182480",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [geany/geany] Kotlin Language Support (#1581)",
"sections": [
{
"text": "",
"activityTitle": "**Jonathan Bradley Whited**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@esotericpig",
"facts": [

]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"geany/geany\",\n\"issueId\": 1581,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close issue",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"geany/geany\",\n\"issueId\": 1581\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/geany/geany/issues/1581#issuecomment-405182480"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 250763543\n}"
}
],
"themeColor": "26292E"
}
]</script>